simplify preview code
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 17 Mar 2007 22:33:34 +0000 (22:33 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 17 Mar 2007 22:33:34 +0000 (22:33 +0000)
IkiWiki/CGI.pm

index 1c4e088dc5c9b92853f24b13ed5a1c23aa82c45d..73727805a38286d4b3c33f9a914d7231ce252f59 100644 (file)
@@ -353,7 +353,6 @@ sub cgi_editpage ($$) { #{{{
                $file=$page.".".$type;
        }
 
-
        $form->field(name => "do", type => 'hidden');
        $form->field(name => "from", type => 'hidden');
        $form->field(name => "rcsinfo", type => 'hidden');
@@ -390,17 +389,11 @@ sub cgi_editpage ($$) { #{{{
                return;
        }
        elsif ($form->submitted eq "Preview") {
-               my $content=$form->field('editcontent');
-               my $comments=$form->field('comments');
-               $form->field(name => "editcontent",
-                               value => $content, force => 1);
-               $form->field(name => "comments",
-                               value => $comments, force => 1);
                $form->tmpl_param("page_preview",
                        htmlize($page, $type,
                        linkify($page, "",
                        preprocess($page, $page,
-                       filter($page, $content), 0, 1))));
+                       filter($page, $form->field('editcontent')), 0, 1))));
        }
        else {
                $form->tmpl_param("page_preview", "");