aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-15 22:28:07 -0400
committerJoey Hess <joey@kitenet.net>2010-05-15 22:28:07 -0400
commit4a6d5330e5b9554f1bd25b9025dd96200c6519c7 (patch)
tree5d5d2a945c5dd38aaaa440de20f33f677ebe2041
parent0287fe29ac7b2e38f8887ad0a5b0f6e98986809f (diff)
downloadikiwiki-4a6d5330e5b9554f1bd25b9025dd96200c6519c7.tar
ikiwiki-4a6d5330e5b9554f1bd25b9025dd96200c6519c7.tar.gz
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.
-rw-r--r--IkiWiki/Plugin/comments.pm1
1 files changed, 1 insertions, 0 deletions
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')) {