diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-15 22:28:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-15 22:28:07 -0400 |
commit | 4a6d5330e5b9554f1bd25b9025dd96200c6519c7 (patch) | |
tree | 5d5d2a945c5dd38aaaa440de20f33f677ebe2041 | |
parent | 0287fe29ac7b2e38f8887ad0a5b0f6e98986809f (diff) | |
download | ikiwiki-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.pm | 1 |
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')) { |