]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fix test when comments_closed_pagespec is empty
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Dec 2008 00:06:29 +0000 (19:06 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Dec 2008 00:06:29 +0000 (19:06 -0500)
IkiWiki/Plugin/comments.pm

index 6e257d1d9b2d21d3da582639c07f5845d09f7fea..0b3007097f77effca18e427b2171051f979c1048 100644 (file)
@@ -529,8 +529,13 @@ sub pagetemplate (@) {
                        $open = length $config{cgiurl} > 0;
                }
 
                        $open = length $config{cgiurl} > 0;
                }
 
-               if (pagespec_match($page,
-                               "$config{comments_closed_pagespec} or */$config{comments_pagename}*",
+               if (pagespec_match($page, "*/$config{comments_pagename}*",
+                               location => $page)) {
+                       $shown = 0;
+                       $open = 0;
+               }
+               if (length $config{comments_closed_pagespec} &&
+                   pagespec_match($page, $config{comments_closed_pagespec},
                                location => $page)) {
                        $shown = 0;
                        $open = 0;
                                location => $page)) {
                        $shown = 0;
                        $open = 0;