Revert "comment: Don't show comments of subpages on parent pages. (Fixes bug introduc...
authorJoey Hess <joey@kitenet.net>
Mon, 28 Mar 2011 15:41:13 +0000 (11:41 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 28 Mar 2011 15:42:21 +0000 (11:42 -0400)
This reverts commit b34d31142b9fed28ec9cf77fe0c5d9f405d48c84.

This was the wrong approach. It broke inlining of comment(*) on eg, a
toplevel comment page.

IkiWiki/Plugin/comments.pm

index 8f475aa56f483b319965a8c132b7db88260e7e93..6691dbafa2e0b0f74055992331b2d899616fd85b 100644 (file)
@@ -957,8 +957,7 @@ sub match_comment ($$;@) {
                }
        }
 
-       return match_glob($page, "$glob/*", internal => 1, @_) &&
-               ! match_glob($page, "$glob/*/*", internal => 1, @_);
+       return match_glob($page, "$glob/*", internal => 1, @_);
 }
 
 sub match_comment_pending ($$;@) {
@@ -973,8 +972,7 @@ sub match_comment_pending ($$;@) {
                return IkiWiki::FailReason->new("$page is not a pending comment");
        }
 
-       return match_glob($page, "$glob/*", internal => 1, @_) &&
-               ! match_glob($page, "$glob/*/*", internal => 1, @_);
+       return match_glob($page, "$glob/*", internal => 1, @_);
 }
 
 1