From: Jean-Philippe Lang Date: Sun, 10 Jul 2016 17:04:34 +0000 (+0000) Subject: Don't generate back url with params. X-Git-Tag: 3.4.0~832 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf62de0ff65edc734219f90d0ec64b3a8019be89;p=redmine.git Don't generate back url with params. git-svn-id: http://svn.redmine.org/redmine/trunk@15629 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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 %>
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 %>
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