]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
t/git-cgi.t: fix race condition
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 4bf8ae4692acb85426f4e87fd4134824c5c708d9..af1ac5ec78358af3484eed0f91f3bdc8082b1940 100644 (file)
@@ -524,11 +524,12 @@ sub editcomment ($$) {
                }
                
                $postcomment=1;
                }
                
                $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} ? (
                        $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,
                        ) : (),
                        page => $location,
                        cgi => $cgi,
@@ -568,7 +569,7 @@ sub editcomment ($$) {
                                length $form->field('subject')) {
                                $message = sprintf(
                                        gettext("Added a comment: %s"),
                                length $form->field('subject')) {
                                $message = sprintf(
                                        gettext("Added a comment: %s"),
-                                       $form->field('subject'));
+                                       scalar $form->field('subject'));
                        }
 
                        IkiWiki::rcs_add($file);
                        }
 
                        IkiWiki::rcs_add($file);
@@ -665,7 +666,7 @@ sub commentmoderation ($$) {
 
                                my $page=IkiWiki::dirname($f);
                                my $file="$config{srcdir}/$f";
 
                                my $page=IkiWiki::dirname($f);
                                my $file="$config{srcdir}/$f";
-                               my $filedir="$config{srcdir}";
+                               my $filedir=$config{srcdir};
                                if (! -e $file) {
                                        # old location
                                        $file="$config{wikistatedir}/comments_pending/".$f;
                                if (! -e $file) {
                                        # old location
                                        $file="$config{wikistatedir}/comments_pending/".$f;