From 7a0432d85c01e36564f80d598e1d43dad148875a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 Jan 2015 09:04:52 +0000 Subject: Adds support for macro and Redmine links in PDF export (#13051). git-svn-id: http://svn.redmine.org/redmine/trunk@13944 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/wiki_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/controllers/wiki_controller.rb') 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 -- cgit v1.2.3