Merge branch 'dev-homepage-revision' into 'develop'
修复版本库不存在时,管理员删除项目出错的bug 修复版本库不存在时,管理员删除项目出错的bug See merge request !186
This commit is contained in:
commit
f3aa5c1718
|
@ -123,7 +123,7 @@ class ProjectsController < ApplicationController
|
|||
def index
|
||||
render_404
|
||||
end
|
||||
|
||||
|
||||
def courserender_404
|
||||
|
||||
end
|
||||
|
@ -158,7 +158,7 @@ class ProjectsController < ApplicationController
|
|||
projects = Project.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all
|
||||
render_feed(projects, :title => "#{Setting.app_title}: #{l(:label_project_latest)}")
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Time 2015-01-29 16:13:20
|
||||
|
@ -191,11 +191,11 @@ class ProjectsController < ApplicationController
|
|||
reply_user_id = params[:reference_user_id]
|
||||
reply_id = params[:reference_message_id]
|
||||
content = params[:project_respond]
|
||||
options = {:user_id => author_id,
|
||||
options = {:user_id => author_id,
|
||||
:m_parent_id => parent_id,
|
||||
:m_reply_id => reply_id,
|
||||
:reply_id => reply_user_id,
|
||||
:notes => content,
|
||||
:notes => content,
|
||||
:is_readed => false}
|
||||
|
||||
@jfm = Project.add_new_jour(nil, nil, project_id, options)
|
||||
|
@ -223,7 +223,7 @@ class ProjectsController < ApplicationController
|
|||
redirect_to signin_url
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def share
|
||||
@shares = @project.shares.reverse
|
||||
@base_courses_tag = @project.project_type
|
||||
|
@ -1124,7 +1124,7 @@ class ProjectsController < ApplicationController
|
|||
g.delete_project(@project.gpid)
|
||||
# 删除Trustie版本库记录
|
||||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
repoisitory.delete unless repository.blank?
|
||||
@project.update_column(:gpid, nil)
|
||||
@project.update_column(:forked_from_project_id, nil)
|
||||
@project_to_destroy = @project
|
||||
|
@ -1175,27 +1175,27 @@ class ProjectsController < ApplicationController
|
|||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def issue_score_index
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def news_score_index
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def file_score_index
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def code_submit_score_index
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
def projects_topic_score_index
|
||||
|
||||
|
||||
end
|
||||
# end
|
||||
|
||||
|
@ -1332,4 +1332,3 @@ class ProjectsController < ApplicationController
|
|||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue