fix test when comments_closed_pagespec is empty

master
Joey Hess 2008-12-17 19:06:29 -05:00
parent 9f141841ef
commit 5feffc8b0b
1 changed files with 7 additions and 2 deletions

View File

@ -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;