]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in...
authorJoey Hess <joey@kitenet.net>
Sun, 27 Feb 2011 22:16:07 +0000 (18:16 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 5 Apr 2012 16:33:20 +0000 (12:33 -0400)
(cherry picked from commit b34d31142b9fed28ec9cf77fe0c5d9f405d48c84)

Conflicts:

doc/bugs/comments_appear_two_times.mdwn

IkiWiki/Plugin/comments.pm
debian/changelog

index 29c9d4f40012b096dba442298f5addd2206d2252..06a2b1bd9bfe5a5a5815f88f983012294124924b 100644 (file)
@@ -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
index 3dac4c400d684b3221a60adf7e76069ba4c804bf..910736f827249d5d55914b8303aee967900af12f 100644 (file)
@@ -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.20100815.8) stable-security; urgency=low
 
   * ikiwiki-mass-rebuild: Fix tty hijacking vulnerability by using su.