]> source.dussan.org Git - redmine.git/commitdiff
Adds before_render hook to WikiController#show (#23545).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Sep 2016 07:39:04 +0000 (07:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Sep 2016 07:39:04 +0000 (07:39 +0000)
Patch by Jens Kraemer.

git-svn-id: http://svn.redmine.org/redmine/trunk@15814 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/wiki_controller.rb

index 1dfb16640d2ca1209a0e0eaa80a86b4f7d3b0a5c..abf106d5ff669dd5b380e5dd438dfd2bf2b55652 100644 (file)
@@ -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"