mirror of
https://github.com/redmine/redmine.git
synced 2024-08-29 05:54:44 +02:00
Code cleanup, removed conditions on request method.
git-svn-id: http://svn.redmine.org/redmine/trunk@13538 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ea2df369dc
commit
50bb640c53
@ -206,16 +206,16 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
|
||||
def archive
|
||||
if request.post?
|
||||
unless @project.archive
|
||||
flash[:error] = l(:error_can_not_archive_project)
|
||||
end
|
||||
unless @project.archive
|
||||
flash[:error] = l(:error_can_not_archive_project)
|
||||
end
|
||||
redirect_to admin_projects_path(:status => params[:status])
|
||||
end
|
||||
|
||||
def unarchive
|
||||
@project.unarchive if request.post? && !@project.active?
|
||||
unless @project.active?
|
||||
@project.unarchive
|
||||
end
|
||||
redirect_to admin_projects_path(:status => params[:status])
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user