mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 00:30:14 +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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user