From b2044e6dfc261656ee477fa0287c98bda3fa183d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Jul 2016 19:18:12 +0000 Subject: [PATCH] Don't generate urls with params. git-svn-id: http://svn.redmine.org/redmine/trunk@15631 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 2 +- app/views/gantts/show.html.erb | 4 ++-- app/views/issues/index.html.erb | 6 +++--- app/views/repositories/diff.html.erb | 2 +- app/views/timelog/index.html.erb | 4 ++-- lib/redmine/views/other_formats_builder.rb | 10 ++++++++++ test/integration/issues_test.rb | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 26613aef8..d939fdc79 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -38,7 +38,7 @@   <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %> + <%= f.link_to_with_query_parameters 'Atom', 'from' => nil, :key => User.current.rss_key %> <% end %> <% content_for :header_tags do %> diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 0f7092081..09a17b166 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -345,8 +345,8 @@ <% other_formats_links do |f| %> - <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %> - <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %> + <%= f.link_to_with_query_parameters 'PDF', @gantt.params %> + <%= f.link_to_with_query_parameters('PNG', @gantt.params) if @gantt.respond_to?('to_image') %> <% end %> <% end # query.valid? %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index fd762023f..d120ce71e 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -76,9 +76,9 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> - <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %> - <%= f.link_to 'PDF', :url => params %> + <%= f.link_to_with_query_parameters 'Atom', :key => User.current.rss_key %> + <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %> + <%= f.link_to_with_query_parameters 'PDF' %> <% end %>