comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.)

master
Joey Hess 2011-02-27 18:16:07 -04:00
parent 821ed9e591
commit b34d31142b
3 changed files with 17 additions and 2 deletions

View 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 ($$;@) {
@ -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

7
debian/changelog vendored
View 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.

View 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]]
>>> 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]]