dev_forum
daiao 6 years ago
commit 162c4e55a2

@ -454,7 +454,7 @@ class GamesController < ApplicationController
tip_exception("初始代码为空,代码重置失败") if @content.nil? tip_exception("初始代码为空,代码重置失败") if @content.nil?
# 将tpm的代码内容同步更新到tpi # 将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 rescue Exception => e
uid_logger_error("#{e.message}") uid_logger_error("#{e.message}")
tip_exception("初始化代码失败") tip_exception("初始化代码失败")
@ -471,7 +471,7 @@ class GamesController < ApplicationController
# else # else
# content # content
# end # 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 else
tip_exception("代码重置失败,代码为空") tip_exception("代码重置失败,代码为空")
end end

@ -769,7 +769,7 @@ class ShixunsController < ApplicationController
def update_file def update_file
content = params[:content] content = params[:content]
author_name = current_user.full_name author_name = current_user.real_name
author_email = current_user.git_mail author_email = current_user.git_mail
@content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser"
end end

Loading…
Cancel
Save