From f99e43353cb6ee797b3cb7e9d83f63bb6f113642 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 26 Jul 2019 10:34:48 +0800 Subject: [PATCH] =?UTF-8?q?git=E9=87=8D=E7=BD=AE=E4=B8=8D=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 4 ++-- app/controllers/shixuns_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 1187ebafa..a51dccb6f 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -454,7 +454,7 @@ class GamesController < ApplicationController tip_exception("初始代码为空,代码重置失败") if @content.nil? # 将tpm的代码内容同步更新到tpi - update_file_content(@content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "reset_original_code") + update_file_content(@content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "reset_original_code") rescue Exception => e uid_logger_error("#{e.message}") tip_exception("初始化代码失败") @@ -471,7 +471,7 @@ class GamesController < ApplicationController # else # content # end - update_file_content(content, @myshixun.repo_path, path, current_user.mail, current_user.full_name, "game passed reset") + update_file_content(content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "game passed reset") else tip_exception("代码重置失败,代码为空") end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 587ef2cb9..ddf67f330 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -768,7 +768,7 @@ class ShixunsController < ApplicationController def update_file content = params[:content] - author_name = current_user.full_name + author_name = current_user.real_name author_email = current_user.git_mail @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" end