]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
comment: Better fix to avoid showing comments of subpages, while not breaking manual...
authorJoey Hess <joey@kitenet.net>
Mon, 28 Mar 2011 15:53:55 +0000 (11:53 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 28 Mar 2011 15:53:55 +0000 (11:53 -0400)
IkiWiki/Plugin/comments.pm
debian/changelog

index 6691dbafa2e0b0f74055992331b2d899616fd85b..8d46ed57983e6a0d0e7cac3c568a6cb368ec34a6 100644 (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',
index e0036af23dffdf1238cf99087a8133d693bafa2d..e78ce3e1c185ae69de25e13bfc15ccabe6f6abc8 100644 (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