From 60dd55e52df66f092cc5ca24a1f83d6d76b7223e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 30 Oct 2015 15:56:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AE=8C=E4=BB=A3=E7=A0=81=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E7=AE=B1=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/helpers/repositories_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 17ce33f99..f32bef51b 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -47,6 +47,7 @@ module RepositoriesHelper def user_commit_rep(mail) user = User.find_by_mail(mail) + user.nil? ? User.find(2) : User.find_by_mail(mail) end def render_properties(properties) From 89507b2b47fff71875bbfe58ed3d041b22f27e35 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 30 Oct 2015 16:26:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E5=86=99=E5=85=A5=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- config/configuration.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index f41dbe6c7..06c1a67e4 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -263,7 +263,7 @@ update @course_tag = params[:course] project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT ip = RepositoriesHelper::REPO_IP_ADDRESS - gitlab_address = RepositoriesHelper::REPO_GITLAB_ADDRESS + gitlab_address = Redmine::Configuration['gitlab_address'] if @repository.type.to_s=="Repository::Gitlab" @repos_url = "http://"+gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git" else diff --git a/config/configuration.yml b/config/configuration.yml index 2ac986927..3790045aa 100644 --- a/config/configuration.yml +++ b/config/configuration.yml @@ -200,6 +200,9 @@ default: repository_root_path: '/tmp/htdocs' judge_server: 'http://judge.trustie.net/' + # Git's url + gitlab_address: 'http://gitfast.trustie.net' + # specific configuration options for production environment # that overrides the default ones production: