From: Joey Hess Date: Sun, 27 Feb 2011 22:16:07 +0000 (-0400) Subject: comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in... X-Git-Tag: 3.20100815.9~9 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/b442d2613d919d49fcd5a2999f33e5d7df86cd5e 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 --- 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.