diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-01 23:15:03 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-01 23:15:03 +0000 |
commit | ed7091cda1427f2fdd29491b8c54ad1dca416e06 (patch) | |
tree | 0b7097f940ba7e41788818ed01f292435e5f4f30 /app/controllers/custom_fields_controller.rb | |
parent | 8632efcce2b432ce8b4e55c9d9563cd37c15eb2e (diff) | |
download | redmine-ed7091cda1427f2fdd29491b8c54ad1dca416e06.tar.gz redmine-ed7091cda1427f2fdd29491b8c54ad1dca416e06.zip |
Fix potential Execution After Redirect bugs.
Execution After Redirect (EAR) happens when redirect in a controller is
triggered but there still is code that is executed in the action.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5611 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/custom_fields_controller.rb')
-rw-r--r-- | app/controllers/custom_fields_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 51457e74c..cfcf7db7d 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -38,8 +38,9 @@ class CustomFieldsController < ApplicationController flash[:notice] = l(:notice_successful_create) call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field) redirect_to :action => 'index', :tab => @custom_field.class.name + else + @trackers = Tracker.find(:all, :order => 'position') end - @trackers = Tracker.find(:all, :order => 'position') end def edit @@ -48,8 +49,9 @@ class CustomFieldsController < ApplicationController flash[:notice] = l(:notice_successful_update) call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field) redirect_to :action => 'index', :tab => @custom_field.class.name + else + @trackers = Tracker.find(:all, :order => 'position') end - @trackers = Tracker.find(:all, :order => 'position') end def destroy |