From cf62de0ff65edc734219f90d0ec64b3a8019be89 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Jul 2016 17:04:34 +0000 Subject: [PATCH] Don't generate back url with params. git-svn-id: http://svn.redmine.org/redmine/trunk@15629 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_list.html.erb | 2 +- app/views/timelog/_list.html.erb | 2 +- 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 %>
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 -- 2.39.5