diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2008-12-17 19:06:29 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2008-12-17 19:06:29 -0500 |
commit | 5feffc8b0b953856052c09dd431984e2e835b439 (patch) | |
tree | 071fa27470588f20a620e9a98acfced40daa9377 /IkiWiki | |
parent | 9f141841efc80dbe7a3ef8cc8fbae102c9cd190b (diff) | |
download | ikiwiki-5feffc8b0b953856052c09dd431984e2e835b439.tar ikiwiki-5feffc8b0b953856052c09dd431984e2e835b439.tar.gz |
fix test when comments_closed_pagespec is empty
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 9 |
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; |