Cleaned up the IssueController redirects to use the back_url like the other actions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3315 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-01-14 23:24:55 +00:00
parent dfe447f841
commit 1827d609a1
3 changed files with 58 additions and 12 deletions

View File

@@ -217,7 +217,7 @@ class IssuesController < ApplicationController
end
call_hook(:controller_issues_edit_after_save, { :params => params, :issue => @issue, :time_entry => @time_entry, :journal => journal})
respond_to do |format|
format.html { redirect_to(params[:back_to] || {:action => 'show', :id => @issue}) }
format.html { redirect_back_or_default({:action => 'show', :id => @issue}) }
format.xml { head :ok }
end
return
@@ -293,7 +293,7 @@ class IssuesController < ApplicationController
:total => @issues.size,
:ids => '#' + unsaved_issue_ids.join(', #'))
end
redirect_to(params[:back_to] || {:controller => 'issues', :action => 'index', :project_id => @project})
redirect_back_or_default({:controller => 'issues', :action => 'index', :project_id => @project})
return
end
@available_statuses = Workflow.available_statuses(@project)