From b442d2613d919d49fcd5a2999f33e5d7df86cd5e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 27 Feb 2011 18:16:07 -0400 Subject: [PATCH] comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.) (cherry picked from commit b34d31142b9fed28ec9cf77fe0c5d9f405d48c84) Conflicts: doc/bugs/comments_appear_two_times.mdwn --- IkiWiki/Plugin/comments.pm | 6 ++++-- debian/changelog | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 29c9d4f40..06a2b1bd9 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -959,7 +959,8 @@ sub match_comment ($$;@) { } } - return match_glob($page, "$glob/*", internal => 1, @_); + return match_glob($page, "$glob/*", internal => 1, @_) && + ! match_glob($page, "$glob/*/*", internal => 1, @_); } sub match_comment_pending ($$;@) { @@ -974,7 +975,8 @@ sub match_comment_pending ($$;@) { return IkiWiki::FailReason->new("$page is not a pending comment"); } - return match_glob($page, "$glob/*", internal => 1, @_); + return match_glob($page, "$glob/*", internal => 1, @_) && + ! match_glob($page, "$glob/*/*", internal => 1, @_); } 1 diff --git a/debian/changelog b/debian/changelog index 3dac4c400..910736f82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20110226) UNRELEASED; urgency=low + + * comment: Don't show comments of subpages on parent pages. + (Fixes bug introduced in version 3.20100505.) + + -- Joey Hess Sun, 27 Feb 2011 18:14:05 -0400 + ikiwiki (3.20100815.8) stable-security; urgency=low * ikiwiki-mass-rebuild: Fix tty hijacking vulnerability by using su. -- 2.39.2