diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-01 17:57:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-01 17:57:30 +0000 |
commit | 88d5663ad261a863db7c6985aa3fd22e74b62684 (patch) | |
tree | 417e3bf883d06bf82d53121d1872a68ccfeb64da /app/controllers | |
parent | 16441b4938d3e9ef41fbb3b8b51b5d99e02a56d4 (diff) | |
download | redmine-88d5663ad261a863db7c6985aa3fd22e74b62684.tar.gz redmine-88d5663ad261a863db7c6985aa3fd22e74b62684.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10903 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects_controller.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 628b1a12c..dc646eb32 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -116,11 +116,7 @@ class ProjectsController < ApplicationController @source_project = Project.find(params[:id]) if request.get? @project = Project.copy_from(@source_project) - if @project - @project.identifier = Project.next_identifier if Setting.sequential_project_identifiers? - else - redirect_to :controller => 'admin', :action => 'projects' - end + @project.identifier = Project.next_identifier if Setting.sequential_project_identifiers? else Mailer.with_deliveries(params[:notifications] == '1') do @project = Project.new @@ -139,7 +135,8 @@ class ProjectsController < ApplicationController end end rescue ActiveRecord::RecordNotFound - redirect_to :controller => 'admin', :action => 'projects' + # source_project not found + render_404 end # Show @project |