]> source.dussan.org Git - redmine.git/commitdiff
Fixed: invalid format parameter returns a DoubleRenderError on issues index (#4737).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Feb 2010 19:58:42 +0000 (19:58 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Feb 2010 19:58:42 +0000 (19:58 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3368 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 9374d97e71455c397983c3d4ef765c86ac0aba96..08032e70350f39f181431a9c5269cd59ee40e286 100644 (file)
@@ -57,13 +57,13 @@ class IssuesController < ApplicationController
     sort_update({'id' => "#{Issue.table_name}.id"}.merge(@query.available_columns.inject({}) {|h, c| h[c.name.to_s] = c.sortable; h}))
     
     if @query.valid?
-      limit = per_page_option
-      respond_to do |format|
-        format.html { }
-        format.xml { }
-        format.atom { limit = Setting.feeds_limit.to_i }
-        format.csv  { limit = Setting.issues_export_limit.to_i }
-        format.pdf  { limit = Setting.issues_export_limit.to_i }
+      limit = case params[:format]
+      when 'csv', 'pdf'
+        Setting.issues_export_limit.to_i
+      when 'atom'
+        Setting.feeds_limit.to_i
+      else
+        per_page_option
       end
       
       @issue_count = @query.issue_count