summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-21 15:08:14 +0000
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-21 15:08:14 +0000
commit95b3bbbf7c786cc9e1dd7d7925ac75a0f525affd (patch)
tree965361aafecd3b38e627c02779d05faff44588a7 /IkiWiki/Plugin
parentbc66a00b90e00971156f1aea5678ce88d006e84d (diff)
comments: run pagetemplate hooks
This fixes the bug that comments are always said to be from an anonymous user at an unknown IP address.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm6
1 files changed, 6 insertions, 0 deletions
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 {