diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-27 18:16:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-27 18:16:07 -0400 |
commit | b34d31142b9fed28ec9cf77fe0c5d9f405d48c84 (patch) | |
tree | 87ab3f1915ffd51765ce9a4e1af1698e535ea1ca | |
parent | 821ed9e5912eba2ef29456a8c609c36ea1e1139b (diff) |
comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.)
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 6 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | doc/bugs/comments_appear_two_times.mdwn | 6 |
3 files changed, 17 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 6691dbafa..8f475aa56 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -957,7 +957,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 ($$;@) { @@ -972,7 +973,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 c092b134c..49cc66936 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 <joeyh@debian.org> Sun, 27 Feb 2011 18:14:05 -0400 + ikiwiki (3.20110225) unstable; urgency=low * editpage: Avoid inheriting internal page types. diff --git a/doc/bugs/comments_appear_two_times.mdwn b/doc/bugs/comments_appear_two_times.mdwn index e382f4083..2ae081844 100644 --- a/doc/bugs/comments_appear_two_times.mdwn +++ b/doc/bugs/comments_appear_two_times.mdwn @@ -16,3 +16,9 @@ This seems to happen at least with versions 3.20100815.6 and 3.20110225. Id didn > --[[Joey]] >> The repo can be cloned now. There was a problem with permissions. --[[wentasah]] + +>>> I see the bug now. Probably most configs hide it by setting +>>> `comments_pagespec` more tightly. It was introduced by +>>> d9d910f6765de6ba07508ab56a5a0f93edb4c8ad, and/or later +>>> changes to actually use the `comments()` PageSpec. +>>> Fixed in git! [[done]] --[[Joey]] |