]> sipb.mit.edu Git - ikiwiki.git/commitdiff
comments: run pagetemplate hooks
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Dec 2008 15:08:14 +0000 (15:08 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Dec 2008 15:08:14 +0000 (15:08 +0000)
This fixes the bug that comments are always said to be from an anonymous
user at an unknown IP address.

IkiWiki/Plugin/comments.pm

index 34bbafeed7f521d5a2cae6bd5301da7ae4dee99f..23e089761005f32319bf2697a6b27ba5b8f8a4ae 100644 (file)
@@ -447,6 +447,12 @@ sub sessioncgi ($$) {
                $template->param(title => $form->field('subject'));
                $template->param(ctime => displaytime(time));
 
                $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 {
                $form->tmpl_param(page_preview => $template->output);
        }
        else {