域名跳转问题、提交代码后版本库不能访问问题
This commit is contained in:
parent
2be1ac0dbd
commit
d16b54a1ea
|
@ -151,7 +151,7 @@ class WelcomeController < ApplicationController
|
||||||
def entry_select
|
def entry_select
|
||||||
#@first_page = FirstPage.where("page_type = 'project'").first
|
#@first_page = FirstPage.where("page_type = 'project'").first
|
||||||
url = request.original_url.gsub('/','')
|
url = request.original_url.gsub('/','')
|
||||||
if url.include?(Setting.host_course)
|
if url.include?(Setting.host_course.gsub('/',''))
|
||||||
if @first_page.show_course == 1
|
if @first_page.show_course == 1
|
||||||
course
|
course
|
||||||
render :course
|
render :course
|
||||||
|
@ -160,7 +160,7 @@ class WelcomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
elsif url.include?(Setting.host_contest)
|
elsif url.include?(Setting.host_contest.gsub('/',''))
|
||||||
if @first_page.show_contest == 1
|
if @first_page.show_contest == 1
|
||||||
contest
|
contest
|
||||||
render :contest
|
render :contest
|
||||||
|
@ -169,7 +169,7 @@ class WelcomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
elsif url.include?(Setting.host_user)
|
elsif url.include?(Setting.host_user.gsub('/',''))
|
||||||
redirect_to(:controller => "users", :action => "index")
|
redirect_to(:controller => "users", :action => "index")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -307,8 +307,11 @@ class Changeset < ActiveRecord::Base
|
||||||
UserScore.project(:push_code, self.user,self, { changeset_id: self.id })
|
UserScore.project(:push_code, self.user,self, { changeset_id: self.id })
|
||||||
#更新用户等级
|
#更新用户等级
|
||||||
UserLevels.update_user_level(self.user)
|
UserLevels.update_user_level(self.user)
|
||||||
update_changeset(self.user,1)
|
unless self.user.nil?
|
||||||
update_changeset(self.user,2,self.repository.project)
|
update_changeset(self.user,1)
|
||||||
|
update_changeset(self.user,2,self.repository.project)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#积分刷新
|
#积分刷新
|
||||||
|
|
Loading…
Reference in New Issue