summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb6
-rw-r--r--app/controllers/wiki_controller.rb6
2 files changed, 4 insertions, 8 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index b8ec626da..d1cac203e 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -49,7 +49,6 @@ class IssuesController < ApplicationController
include SortHelper
include IssuesHelper
helper :timelog
- include Redmine::Export::PDF
def index
retrieve_query
@@ -89,7 +88,7 @@ class IssuesController < ApplicationController
}
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
- format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
+ format.pdf { send_file_headers! :type => 'application/pdf', :filename => 'issues.pdf' }
end
else
respond_to do |format|
@@ -130,8 +129,7 @@ class IssuesController < ApplicationController
format.api
format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
format.pdf {
- pdf = issue_to_pdf(@issue, :journals => @journals)
- send_data(pdf, :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf")
+ send_file_headers! :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf"
}
end
end
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index f6dc0ffca..6f6c6bbdf 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -78,7 +78,7 @@ class WikiController < ApplicationController
end
if User.current.allowed_to?(:export_wiki_pages, @project)
if params[:format] == 'pdf'
- send_data(wiki_page_to_pdf(@page, @project), :type => 'application/pdf', :filename => "#{@page.title}.pdf")
+ send_file_headers! :type => 'application/pdf', :filename => "#{@page.title}.pdf"
return
elsif params[:format] == 'html'
export = render_to_string :action => 'export', :layout => false
@@ -283,9 +283,7 @@ class WikiController < ApplicationController
send_data(export, :type => 'text/html', :filename => "wiki.html")
}
format.pdf {
- send_data(wiki_pages_to_pdf(@pages, @project),
- :type => 'application/pdf',
- :filename => "#{@project.identifier}.pdf")
+ send_file_headers! :type => 'application/pdf', :filename => "#{@project.identifier}.pdf"
}
end
end