summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/comments.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 6e257d1d9..0b3007097 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -529,8 +529,13 @@ sub pagetemplate (@) {
$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;