]> sipb.mit.edu Git - ikiwiki.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>
Sun, 27 Feb 2011 22:16:07 +0000 (18:16 -0400)
IkiWiki/Plugin/comments.pm
debian/changelog
doc/bugs/comments_appear_two_times.mdwn

index 6691dbafa2e0b0f74055992331b2d899616fd85b..8f475aa56f483b319965a8c132b7db88260e7e93 100644 (file)
@@ -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 ($$;@) {
 }
 
 sub match_comment_pending ($$;@) {
@@ -972,7 +973,8 @@ sub match_comment_pending ($$;@) {
                return IkiWiki::FailReason->new("$page is not a pending comment");
        }
 
                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
 }
 
 1
index c092b134c614e3a49d0e8876d341130577dec712..49cc669369e8d2f44688398b6bf4673f3d9e1314 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.20110225) unstable; urgency=low
 
   * editpage: Avoid inheriting internal page types.
 ikiwiki (3.20110225) unstable; urgency=low
 
   * editpage: Avoid inheriting internal page types.
index e382f4083891c963062ddf773a553fd87b1b467f..2ae0818441b37c16559e469ff551de3d0b30c203 100644 (file)
@@ -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]]
 > --[[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]]