editpage, comments: Fix broken links in sidebar (due to forcebaseurl). (Thanks, privat)

master
Joey Hess 2010-06-14 14:34:52 -04:00
parent f9dc2bf859
commit c0bc2d0839
4 changed files with 10 additions and 8 deletions

View File

@ -537,7 +537,7 @@ sub editcomment ($$) {
}
else {
IkiWiki::showform ($form, \@buttons, $session, $cgi,
forcebaseurl => $baseurl);
forcebaseurl => $baseurl, page => $page);
}
exit;

View 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;
}
@ -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

2
debian/changelog vendored
View File

@ -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 <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400

View File

@ -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"