X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/017f335aff7df37d0a22f11f45fec05c5e446826..885bff723998525c10d7ea8ad295547f5fcc939a:/IkiWiki/Plugin/editpage.pm diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index da071d492..f6cebd4cd 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -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