]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/editpage.pm
response
[git.ikiwiki.info.git] / IkiWiki / Plugin / editpage.pm
index 21f1f18240350ebc2e509e2b3b164c04b3205611..1a04a72b5568f2980d8a7e00d0eaaa06a62e0e0d 100644 (file)
@@ -313,9 +313,7 @@ sub cgi_editpage ($$) {
                }
                
                showform($form, \@buttons, $session, $q,
-                       forcebaseurl => $baseurl,
-                       ($previewing ? (page => $page) : ()),
-               );
+                       forcebaseurl => $baseurl, page => $page);
        }
        else {
                # save page
@@ -333,7 +331,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl);
+                               forcebaseurl => $baseurl, page => $page);
                        exit;
                }
                elsif ($form->field("do") eq "create" && $exists) {
@@ -348,7 +346,7 @@ sub cgi_editpage ($$) {
                                         "\n\n\n".$form->field("editcontent"),
                                force => 1);
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl);
+                               forcebaseurl => $baseurl, page => $page);
                        exit;
                }
                        
@@ -389,7 +387,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl);
+                               forcebaseurl => $baseurl, page => $page);
                        exit;
                }
                
@@ -403,9 +401,12 @@ sub cgi_editpage ($$) {
                        # signaling to it that it should not try to
                        # do anything.
                        disable_commit_hook();
-                       $conflict=rcs_commit($file, $message,
-                               $form->field("rcsinfo"),
-                               $session->param("name"), $ENV{REMOTE_ADDR});
+                       $conflict=rcs_commit(
+                               file => $file,
+                               message => $message,
+                               token => $form->field("rcsinfo"),
+                               session => $session,
+                       );
                        enable_commit_hook();
                        rcs_update();
                }
@@ -428,7 +429,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl);
+                               forcebaseurl => $baseurl, page => $page);
                }
                else {
                        # The trailing question mark tries to avoid broken