make postcomment() pagespecs work while in checkcontent
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 17 Jan 2009 02:58:05 +0000 (21:58 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 17 Jan 2009 02:58:05 +0000 (21:58 -0500)
IkiWiki/Plugin/comments.pm

index 14e785c8f71cc06977899abc5220856697f5fb4d..833bedf25dcbad59a6f1dc3faed0f5c764b03db9 100644 (file)
@@ -469,6 +469,7 @@ sub sessioncgi ($$) {
        if ($form->submitted eq POST_COMMENT && $form->validate) {
                IkiWiki::checksessionexpiry($cgi, $session);
                
+               $postcomment=1;
                IkiWiki::check_content(content => $form->field('editcontent'),
                        subject => $form->field('subject'),
                        $config{comments_allowauthor} ? (
@@ -476,7 +477,9 @@ sub sessioncgi ($$) {
                                url => $form->field('url'),
                        ) : (),
                        page => $location,
-                       cgi => $cgi, session => $session);
+                       cgi => $cgi, session => $session
+               );
+               $postcomment=0;
                
                my $file = "$location._comment";