X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/63fa0ef5ba9a2e367791dd19b9aeb7c98d70ac85..6c546c8f3182668c6d21d578b789674894f18c39:/IkiWiki/Plugin/comments.pm
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index b47f965e7..edf5183a6 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -126,7 +126,7 @@ sub htmlize {
sub htmlize_pending {
my %params = @_;
return sprintf(gettext("this comment needs %s"),
- ''.
gettext("moderation").'');
}
@@ -265,7 +265,7 @@ sub preprocess {
$pagestate{$page}{meta}{title} = decode_entities($params{subject});
}
- if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
+ if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+/) {
$pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page})).
"#".page_to_id($params{page});
}
@@ -286,7 +286,7 @@ sub preprocess_moderation {
unless defined $params{desc};
if (length $config{cgiurl}) {
- return ''.$params{desc}.'';
}
@@ -557,11 +557,12 @@ sub editcomment ($$) {
}
$postcomment=1;
- my $ok=IkiWiki::check_content(content => $form->field('editcontent'),
- subject => $form->field('subject'),
+ my $ok=IkiWiki::check_content(
+ content => scalar $form->field('editcontent'),
+ subject => scalar $form->field('subject'),
$config{comments_allowauthor} ? (
- author => $form->field('author'),
- url => $form->field('url'),
+ author => scalar $form->field('author'),
+ url => scalar $form->field('url'),
) : (),
page => $location,
cgi => $cgi,
@@ -601,7 +602,7 @@ sub editcomment ($$) {
length $form->field('subject')) {
$message = sprintf(
gettext("Added a comment: %s"),
- $form->field('subject'));
+ scalar $form->field('subject'));
}
IkiWiki::rcs_add($file);
@@ -945,7 +946,7 @@ sub pagetemplate (@) {
);
}
elsif (commentsopen($page)) {
- $link = "".
+ $link = "".
#translators: Here "Comment" is a verb;
#translators: the user clicks on it to
#translators: post a comment.