From a0e31f38d55f659ed9ef07ce16482308807435f8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Mar 2011 11:53:55 -0400 Subject: [PATCH] comment: Better fix to avoid showing comments of subpages, while not breaking manual inlining of comments. --- IkiWiki/Plugin/comments.pm | 8 +++----- debian/changelog | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 6691dbafa..8d46ed579 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -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', diff --git a/debian/changelog b/debian/changelog index e0036af23..e78ce3e1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ikiwiki (3.20110322) UNRELEASED; urgency=low (Perl formatted setup files can still be used.) * Add timezone setting in setup file. This alows time zone to be configured via the web. + * comment: Better fix to avoid showing comments of subpages, while + not breaking manual inlining of comments. -- Joey Hess Thu, 24 Mar 2011 13:34:34 -0400 -- 2.39.5