From c0bc2d08398ae5cfa6becba155a2127a481a4d5e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jun 2010 14:34:52 -0400 Subject: editpage, comments: Fix broken links in sidebar (due to forcebaseurl). (Thanks, privat) --- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index b244a7431..d204a7737 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -537,7 +537,7 @@ sub editcomment ($$) { } else { IkiWiki::showform ($form, \@buttons, $session, $cgi, - forcebaseurl => $baseurl); + forcebaseurl => $baseurl, page => $page); } exit; diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 21f1f1824..3ba6c519e 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -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; } @@ -428,7 +426,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 -- cgit v1.2.3