diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-09-03 07:39:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-09-03 07:39:04 +0000 |
commit | fa3a167cdf16eb4952fefc66850a01ccc0a06e7c (patch) | |
tree | 0d34746d0af27e665b1ff043916b1d3521a88988 | |
parent | d744749d5ebfed695d7382a2f813d2ca884afc73 (diff) | |
download | redmine-fa3a167cdf16eb4952fefc66850a01ccc0a06e7c.tar.gz redmine-fa3a167cdf16eb4952fefc66850a01ccc0a06e7c.zip |
Adds before_render hook to WikiController#show (#23545).
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15814 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/wiki_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 1dfb16640..abf106d5f 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -95,6 +95,9 @@ class WikiController < ApplicationController end return end + + call_hook :controller_wiki_show_before_render, content: @content, format: params[:format] + if User.current.allowed_to?(:export_wiki_pages, @project) if params[:format] == 'pdf' send_file_headers! :type => 'application/pdf', :filename => "#{@page.title}.pdf" |