diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-10 17:04:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-10 17:04:34 +0000 |
commit | cf62de0ff65edc734219f90d0ec64b3a8019be89 (patch) | |
tree | ab612b241e0fa731f2a79659656f92868e206382 | |
parent | fc6ee694907864eb3b98ae80ffdf3397b06322e8 (diff) | |
download | redmine-cf62de0ff65edc734219f90d0ec64b3a8019be89.tar.gz redmine-cf62de0ff65edc734219f90d0ec64b3a8019be89.zip |
Don't generate back url with params.
git-svn-id: http://svn.redmine.org/redmine/trunk@15629 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/issues/_list.html.erb | 2 | ||||
-rw-r--r-- | app/views/timelog/_list.html.erb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 26287e75c..2376a845b 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -1,5 +1,5 @@ <%= form_tag({}) do -%> -<%= hidden_field_tag 'back_url', url_for(params), :id => nil %> +<%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %> <div class="autoscroll"> <table class="list issues <%= sort_css_classes %>"> <thead> diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index 89e1bc8c3..71fe41a68 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -1,5 +1,5 @@ <%= form_tag({}) do -%> -<%= hidden_field_tag 'back_url', url_for(params) %> +<%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %> <div class="autoscroll"> <table class="list time-entries"> <thead> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 83cdb27ac..176fd42e5 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -721,6 +721,12 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_index_should_include_back_url_input + get :index, :project_id => 'ecookbook', :foo => 'bar' + assert_response :success + assert_select 'input[name=back_url][value=?]', '/projects/ecookbook/issues?foo=bar' + end + def test_index_sort get :index, :sort => 'tracker,id:desc' assert_response :success |