X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4e92548ebc39c083e7ed8b870f4c13ba229127cd..72dd9a9a0434e1682d7e27b935500c010a03dddc:/IkiWiki/Plugin/comments.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 995d1f4eb..ee53dbc91 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -26,6 +26,8 @@ sub import { hook(type => "htmlize", id => "_comment", call => \&htmlize); hook(type => "pagetemplate", id => "comments", call => \&pagetemplate); hook(type => "formbuilder_setup", id => "comments", call => \&formbuilder_setup); + # Load goto to fix up user page links for logged-in commenters + IkiWiki::loadplugin("goto"); IkiWiki::loadplugin("inline"); } @@ -603,7 +605,8 @@ sub formbuilder_setup (@) { my %params=@_; my $form=$params{form}; - if ($form->title eq "preferences") { + if ($form->title eq "preferences" && + IkiWiki::is_admin($params{session}->param("name"))) { push @{$params{buttons}}, "Comment Moderation"; if ($form->submitted && $form->submitted eq "Comment Moderation") { commentmoderation($params{cgi}, $params{session});