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 /IkiWiki/Plugin | |
parent | 821ed9e5912eba2ef29456a8c609c36ea1e1139b (diff) |
comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.)
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 6 |
1 files changed, 4 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 |