Fixed: invalid format parameter returns a DoubleRenderError on issues index (#4737).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3368 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-02-04 19:58:42 +00:00
parent ea51dcf911
commit 626b71622d
1 changed files with 7 additions and 7 deletions

View 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})) 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? if @query.valid?
limit = per_page_option limit = case params[:format]
respond_to do |format| when 'csv', 'pdf'
format.html { } Setting.issues_export_limit.to_i
format.xml { } when 'atom'
format.atom { limit = Setting.feeds_limit.to_i } Setting.feeds_limit.to_i
format.csv { limit = Setting.issues_export_limit.to_i } else
format.pdf { limit = Setting.issues_export_limit.to_i } per_page_option
end end
@issue_count = @query.issue_count @issue_count = @query.issue_count