]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
rename hook: run once per file to be renamed
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 3cdffe856132160df72045d275d6de6d7666631c..ee53dbc91e4e0b6768e36d23705da64a02cf0e1b 100644 (file)
@@ -605,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});