avoid showing comment post stuff on dynamic pages

If the site is configured to allow comments on *, then the comment post
interface was being added to cgi pages like signin and prefs. This fixes it
w/o requiring more page.tmpl changes. The pagetemplate hook is called by
misctemplate with an empty page name for dynamic pages.
master
Joey Hess 2010-05-15 22:28:07 -04:00
parent 0287fe29ac
commit 4a6d5330e5
1 changed files with 1 additions and 0 deletions

View File

@ -742,6 +742,7 @@ sub pagetemplate (@) {
$template->query(name => 'commentsurl') || $template->query(name => 'commentsurl') ||
$template->query(name => 'atomcommentsurl') || $template->query(name => 'atomcommentsurl') ||
$template->query(name => 'comments')) && $template->query(name => 'comments')) &&
length $page && # not dynamic
commentsshown($page); commentsshown($page);
if ($template->query(name => 'comments')) { if ($template->query(name => 'comments')) {