]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
remove fixme
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 6c8952d4553deb99d1435beddd5de21aae76771c..273561cadc29f186acfc68cf77a24f4e7956493b 100644 (file)
@@ -391,13 +391,6 @@ sub sessioncgi ($$) { #{{{
        IkiWiki::check_canedit($page, $cgi, $session);
        $postcomment=0;
 
        IkiWiki::check_canedit($page, $cgi, $session);
        $postcomment=0;
 
-       my $editcontent = $form->field('editcontent') || '';
-       $editcontent =~ s/\r\n/\n/g;
-       $editcontent =~ s/\r/\n/g;
-
-       # FIXME: check that the wiki is locked right now, because
-       # if it's not, there are mad race conditions!
-
        # FIXME: rather a simplistic way to make the comments...
        my $i = 0;
        my $file;
        # FIXME: rather a simplistic way to make the comments...
        my $i = 0;
        my $file;
@@ -407,9 +400,6 @@ sub sessioncgi ($$) { #{{{
                $location = "$page/${comments_pagename}${i}";
        } while (-e "$config{srcdir}/$location._comment");
 
                $location = "$page/${comments_pagename}${i}";
        } while (-e "$config{srcdir}/$location._comment");
 
-       my $anchor = "${comments_pagename}${i}";
-
-       $editcontent =~ s/"/\\"/g;
        my $content = "[[!_comment format=$type\n";
 
        # FIXME: handling of double quotes probably wrong?
        my $content = "[[!_comment format=$type\n";
 
        # FIXME: handling of double quotes probably wrong?
@@ -446,6 +436,10 @@ sub sessioncgi ($$) { #{{{
 
        $content .= " date=\"" . decode_utf8(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime)) . "\"\n";
 
 
        $content .= " date=\"" . decode_utf8(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime)) . "\"\n";
 
+       my $editcontent = $form->field('editcontent') || '';
+       $editcontent =~ s/\r\n/\n/g;
+       $editcontent =~ s/\r/\n/g;
+       $editcontent =~ s/"/\\"/g;
        $content .= " content=\"\"\"\n$editcontent\n\"\"\"]]\n";
 
        # This is essentially a simplified version of editpage:
        $content .= " content=\"\"\"\n$editcontent\n\"\"\"]]\n";
 
        # This is essentially a simplified version of editpage: