]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/editpage.pm
make urlabs a noop if base url is not provided
[git.ikiwiki.info.git] / IkiWiki / Plugin / editpage.pm
index da071d4920fe0e5fcafde8f20419925522278d31..f6cebd4cd466eba086aa232bf54381607bc7add7 100644 (file)
@@ -291,7 +291,7 @@ sub cgi_editpage ($$) {
                                value => $best_loc);
                        $form->field(name => "type", type => 'select',
                                options => \@page_types);
-                       $form->title(sprintf(gettext("creating %s"), pagetitle($page)));
+                       $form->title(sprintf(gettext("creating %s"), pagetitle(basename($page))));
                        
                }
                elsif ($form->field("do") eq "edit") {
@@ -309,11 +309,10 @@ sub cgi_editpage ($$) {
                        $form->tmpl_param("page_select", 0);
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
-                       $form->title(sprintf(gettext("editing %s"), pagetitle($page)));
+                       $form->title(sprintf(gettext("editing %s"), pagetitle(basename($page))));
                }
                
-               showform($form, \@buttons, $session, $q,
-                       forcebaseurl => $baseurl, page => $page);
+               showform_preview($form, \@buttons, $session, $q, page => $page);
        }
        else {
                # save page
@@ -330,8 +329,8 @@ sub cgi_editpage ($$) {
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
-                       showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                       showform_preview($form, \@buttons, $session, $q,
+                               page => $page);
                        exit;
                }
                elsif ($form->field("do") eq "create" && $exists) {
@@ -345,8 +344,8 @@ sub cgi_editpage ($$) {
                                value => readfile("$config{srcdir}/$file").
                                         "\n\n\n".$form->field("editcontent"),
                                force => 1);
-                       showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                       showform_preview($form, \@buttons, $session, $q,
+                               page => $page);
                        exit;
                }
                        
@@ -386,8 +385,8 @@ sub cgi_editpage ($$) {
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
-                       showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                       showform_preview($form, \@buttons, $session, $q,
+                               page => $page);
                        exit;
                }
                
@@ -428,8 +427,8 @@ sub cgi_editpage ($$) {
                        $form->field(name => "page", type => 'hidden');
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
-                       showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                       showform_preview($form, \@buttons, $session, $q,
+                               page => $page);
                }
                else {
                        # The trailing question mark tries to avoid broken