comment: Better fix to avoid showing comments of subpages, while not breaking manual inlining of comments.

master
Joey Hess 2011-03-28 11:53:55 -04:00
parent 6908406989
commit a0e31f38d5
2 changed files with 5 additions and 5 deletions

View File

@ -755,10 +755,8 @@ sub previewcomment ($$$) {
sub commentsshown ($) {
my $page=shift;
return ! pagespec_match($page, "comment(*)",
location => $page) &&
pagespec_match($page, $config{comments_pagespec},
location => $page);
return pagespec_match($page, $config{comments_pagespec},
location => $page);
}
sub commentsopen ($) {
@ -785,7 +783,7 @@ sub pagetemplate (@) {
my $comments = undef;
if ($shown) {
$comments = IkiWiki::preprocess_inline(
pages => "comment($page)",
pages => "comment($page) and !comment($page/*)",
template => 'comment',
show => 0,
reverse => 'yes',

2
debian/changelog vendored
View File

@ -4,6 +4,8 @@ ikiwiki (3.20110322) UNRELEASED; urgency=low
(Perl formatted setup files can still be used.)
* Add timezone setting in setup file. This alows time zone to be configured
via the web.
* comment: Better fix to avoid showing comments of subpages, while
not breaking manual inlining of comments.
-- Joey Hess <joeyh@debian.org> Thu, 24 Mar 2011 13:34:34 -0400