Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-10-30 16:56:06 +08:00
commit e0c488f970
3 changed files with 5 additions and 1 deletions

View File

@ -263,7 +263,7 @@ update
@course_tag = params[:course] @course_tag = params[:course]
project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT project_path_cut = RepositoriesHelper::PROJECT_PATH_CUT
ip = RepositoriesHelper::REPO_IP_ADDRESS ip = RepositoriesHelper::REPO_IP_ADDRESS
gitlab_address = RepositoriesHelper::REPO_GITLAB_ADDRESS gitlab_address = Redmine::Configuration['gitlab_address']
if @repository.type.to_s=="Repository::Gitlab" if @repository.type.to_s=="Repository::Gitlab"
@repos_url = "http://"+gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git" @repos_url = "http://"+gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git"
else else

View File

@ -47,6 +47,7 @@ module RepositoriesHelper
def user_commit_rep(mail) def user_commit_rep(mail)
user = User.find_by_mail(mail) user = User.find_by_mail(mail)
user.nil? ? User.find(2) : User.find_by_mail(mail)
end end
def render_properties(properties) def render_properties(properties)

View File

@ -200,6 +200,9 @@ default:
repository_root_path: '/tmp/htdocs' repository_root_path: '/tmp/htdocs'
judge_server: 'http://judge.trustie.net/' judge_server: 'http://judge.trustie.net/'
# Git's url
gitlab_address: 'http://gitfast.trustie.net'
# specific configuration options for production environment # specific configuration options for production environment
# that overrides the default ones # that overrides the default ones
production: production: