From: Simon McVittie
Date: Thu, 18 Dec 2008 20:01:08 +0000 (+0000)
Subject: comments: Rename COMMENTURL to ADDCOMMENTURL to avoid confusion with COMMENTAUTHORURL
X-Git-Tag: 2.71~33^2~2
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9e889c39ed9971e31dc33f4dea73a91d6938b535;p=ikiwiki.git
comments: Rename COMMENTURL to ADDCOMMENTURL to avoid confusion with COMMENTAUTHORURL
Also refactor page.tmpl to use if/else rather than unless/if.
---
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index d095a00bd..4f3b76db3 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -548,9 +548,9 @@ sub pagetemplate (@) {
}
if ($shown && commentsopen($page)) {
- my $commenturl = IkiWiki::cgiurl(do => 'comment',
+ my $addcommenturl = IkiWiki::cgiurl(do => 'comment',
page => $page);
- $template->param(commenturl => $commenturl);
+ $template->param(addcommenturl => $addcommenturl);
}
}
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 21abc979d..f75491127 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -74,13 +74,12 @@