]> source.dussan.org Git - redmine.git/commitdiff
Don't generate urls with params.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 17:20:28 +0000 (17:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 17:20:28 +0000 (17:20 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15630 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/calendars_helper.rb
app/helpers/gantt_helper.rb
app/helpers/issues_helper.rb
app/views/activities/index.html.erb
app/views/gantts/show.html.erb

index cb13276255cd1cc619e4725c872306e757b04dd3..ec56abc9176668f97387aa7bc63ae8a100b65afd 100644 (file)
@@ -53,6 +53,6 @@ module CalendarsHelper
   end
 
   def link_to_month(link_name, year, month, options={})
-    link_to(link_name, params.merge(:year => year, :month => month), options)
+    link_to(link_name, {:params => request.query_parameters.merge(:year => year, :month => month)}, options)
   end
 end
index 3c68cadaedc77f2c0ffe1655c466e799d27f3e89..d49c60dd27ad72f3affc073dea5c43ca01839783 100644 (file)
@@ -24,7 +24,7 @@ module GanttHelper
     when :in
       if gantt.zoom < 4
         link_to l(:text_zoom_in),
-          params.merge(gantt.params.merge(:zoom => (gantt.zoom + 1))),
+          {:params => request.query_parameters.merge(gantt.params.merge(:zoom => (gantt.zoom + 1)))},
           :class => 'icon icon-zoom-in'
       else
         content_tag(:span, l(:text_zoom_in), :class => 'icon icon-zoom-in').html_safe
@@ -33,7 +33,7 @@ module GanttHelper
     when :out
       if gantt.zoom > 1
         link_to l(:text_zoom_out),
-          params.merge(gantt.params.merge(:zoom => (gantt.zoom - 1))),
+          {:params => request.query_parameters.merge(gantt.params.merge(:zoom => (gantt.zoom - 1)))},
           :class => 'icon icon-zoom-out'
       else
         content_tag(:span, l(:text_zoom_out), :class => 'icon icon-zoom-out').html_safe
index db9483274e7c4d56b05fa5fa1aafa7aed4d58ae1..a276a61ff8acf968dbfc692c20bd820f6f5dc940 100644 (file)
@@ -290,7 +290,7 @@ module IssuesHelper
   def query_links(title, queries)
     return '' if queries.empty?
     # links to #index on issues/show
-    url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
+    url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : {}
 
     content_tag('h3', title) + "\n" +
       content_tag('ul',
index d3a780f0c7028d420bc65bf2247ed0daad5edcb1..26613aef89942b1860eec9a601c1ba1927560763 100644 (file)
   <ul class="pages">
     <li class="previous page">
 <%= link_to("\xc2\xab " + l(:label_previous),
-                   params.merge(:from => @date_to - @days - 1),
+                   {:params => request.query_parameters.merge(:from => @date_to - @days - 1)},
                    :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)),
                    :accesskey => accesskey(:previous)) %>
     </li><% unless @date_to >= User.current.today %><li class="next page">
 <%= link_to(l(:label_next) + " \xc2\xbb",
-                   params.merge(:from => @date_to + @days - 1),
+                   {:params => request.query_parameters.merge(:from => @date_to + @days - 1)},
                    :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)),
                    :accesskey => accesskey(:next)) %><% end %>
     </li>
index 1337fefe9a053010c640c459411f7e77b3e46245..0f7092081eb0c3cc2a3f9c490aca281e077b4740 100644 (file)
 <tr>
   <td style="text-align:left;">
     <%= link_to("\xc2\xab " + l(:label_previous),
-                               params.merge(@gantt.params_previous),
+                               {:params => request.query_parameters.merge(@gantt.params_previous)},
                                :accesskey => accesskey(:previous)) %>
   </td>
   <td style="text-align:right;">
     <%= link_to(l(:label_next) + " \xc2\xbb",
-                               params.merge(@gantt.params_next),
+                               {:params => request.query_parameters.merge(@gantt.params_next)},
                                :accesskey => accesskey(:next)) %>
   </td>
 </tr>