From: Simon McVittie Date: Sun, 21 Dec 2008 15:08:14 +0000 (+0000) Subject: comments: run pagetemplate hooks X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/95b3bbbf7c786cc9e1dd7d7925ac75a0f525affd?hp=bc66a00b90e00971156f1aea5678ce88d006e84d;ds=sidebyside comments: run pagetemplate hooks This fixes the bug that comments are always said to be from an anonymous user at an unknown IP address. --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 34bbafeed..23e089761 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -447,6 +447,12 @@ sub sessioncgi ($$) { $template->param(title => $form->field('subject')); $template->param(ctime => displaytime(time)); + IkiWiki::run_hooks(pagetemplate => sub { + shift->(page => $location, + destpage => $page, + template => $template); + }); + $form->tmpl_param(page_preview => $template->output); } else {