Commit c6bc3707 authored by jplang's avatar jplang

Don't generate pagination links with params.

git-svn-id: https://svn.redmine.org/redmine/trunk@15627 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4a5eca5a
...@@ -145,7 +145,7 @@ module Redmine ...@@ -145,7 +145,7 @@ module Redmine
if block_given? if block_given?
yield text, parameters, options yield text, parameters, options
else else
link_to text, params.merge(parameters), options link_to text, {:params => request.query_parameters.merge(parameters)}, options
end end
end end
end end
......
...@@ -135,11 +135,11 @@ class IssuesTest < Redmine::IntegrationTest ...@@ -135,11 +135,11 @@ class IssuesTest < Redmine::IntegrationTest
end end
end end
def test_pagination_links_on_index_without_project_id_in_url def test_pagination_links_should_preserve_query_parameters
with_settings :per_page_options => '2' do with_settings :per_page_options => '2' do
get '/issues', :project_id => 'ecookbook' get '/projects/ecookbook/issues?foo=bar'
assert_select 'a[href=?]', '/projects/ecookbook/issues?page=2', :text => '2' assert_select 'a[href=?]', '/projects/ecookbook/issues?foo=bar&page=2', :text => '2'
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment