From c0bc2d08398ae5cfa6becba155a2127a481a4d5e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jun 2010 14:34:52 -0400 Subject: [PATCH 1/1] editpage, comments: Fix broken links in sidebar (due to forcebaseurl). (Thanks, privat) --- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 12 +++++------- debian/changelog | 2 ++ ..._respect_the_current_page___40__if_any__41__.mdwn | 2 ++ 4 files changed, 10 insertions(+), 8 deletions(-) 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 diff --git a/debian/changelog b/debian/changelog index 52b727440..32ba0cf08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ ikiwiki (3.20100611) UNRELEASED; urgency=low * attachment: When inserting links, insert img directives for images, if that plugin is enabled. * websetup: Allow enabling plugins listed in disable_plugins. + * editpage, comments: Fix broken links in sidebar (due to forcebaseurl). + (Thanks, privat) -- Joey Hess Fri, 11 Jun 2010 13:39:15 -0400 diff --git a/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn b/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn index c6f1cef3d..adf0ec745 100644 --- a/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn +++ b/doc/bugs/misctemplate_does_not_respect_the_current_page___40__if_any__41__.mdwn @@ -33,6 +33,8 @@ But it causes some nasty bugs for plugins that use the pagetemplate hook. It is >> >> The fix commited work for previewing, but not in other cases : links are still broken. Please juste follow the example step-by-step to reproduce it (I just retried it with a "fixed" version: Debian 3.20100610). If you cannot reproduce, please say it explicitely instead of guessing about my innability to read changelogs. -- [[JeanPrivat]] +>>> Sorry if my not seeing the bug offended you. [[Fixed|done]] --[[Joey]] + ### A second example * create "/bar/sidebar.mdwn" with "world" -- 2.39.5