From 4a6d5330e5b9554f1bd25b9025dd96200c6519c7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 May 2010 22:28:07 -0400 Subject: 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. --- IkiWiki/Plugin/comments.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'IkiWiki/Plugin') 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')) { -- cgit v1.2.3