Browse Source

Code cleanup, removed conditions on request method.

git-svn-id: http://svn.redmine.org/redmine/trunk@13538 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.0.0
Jean-Philippe Lang 9 years ago
parent
commit
50bb640c53
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      app/controllers/projects_controller.rb

+ 5
- 5
app/controllers/projects_controller.rb View File

@@ -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…
Cancel
Save