From: Joey Hess Date: Sun, 16 May 2010 02:28:07 +0000 (-0400) Subject: avoid showing comment post stuff on dynamic pages X-Git-Tag: 3.20100515~6 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/4a6d5330e5b9554f1bd25b9025dd96200c6519c7 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. --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 3cafcbe9c..af7e7eccd 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -742,6 +742,7 @@ sub pagetemplate (@) { $template->query(name => 'commentsurl') || $template->query(name => 'atomcommentsurl') || $template->query(name => 'comments')) && + length $page && # not dynamic commentsshown($page); if ($template->query(name => 'comments')) {