X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/594a9194561ad373a31a7d34c6b5c7a84ec417a0..7bc87c8b9207ebb254bbd2452e1a37832b552d3f:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index d9183970d..8d46ed579 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -365,7 +365,7 @@ sub editcomment ($$) { # The untaint is OK (as in editpage) because we're about to pass # it to file_pruned and wiki_file_regexp anyway. - my $page = $form->field('page')=~/$config{wiki_file_regexp}/; + my ($page) = $form->field('page')=~/$config{wiki_file_regexp}/; $page = IkiWiki::possibly_foolish_untaint($page); if (! defined $page || ! length $page || IkiWiki::file_pruned($page)) { @@ -755,10 +755,8 @@ sub previewcomment ($$$) { sub commentsshown ($) { my $page=shift; - return ! pagespec_match($page, "comment(*)", - location => $page) && - pagespec_match($page, $config{comments_pagespec}, - location => $page); + return pagespec_match($page, $config{comments_pagespec}, + location => $page); } sub commentsopen ($) { @@ -785,7 +783,7 @@ sub pagetemplate (@) { my $comments = undef; if ($shown) { $comments = IkiWiki::preprocess_inline( - pages => "comment($page)", + pages => "comment($page) and !comment($page/*)", template => 'comment', show => 0, reverse => 'yes',