}
if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
- $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page}), undef).
+ $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page})).
"#".page_to_id($params{page});
}
error(gettext("bad page name"));
}
- my $baseurl = urlto($page, undef);
+ my $baseurl = urlto($page);
$form->title(sprintf(gettext("commenting on %s"),
IkiWiki::pagetitle($page)));
if ($form->submitted eq CANCEL) {
# bounce back to the page they wanted to comment on, and exit.
- # CANCEL need not be considered in future
- IkiWiki::redirect($cgi, urlto($page, undef));
+ IkiWiki::redirect($cgi, $baseurl);
exit;
}
# Jump to the new comment on the page.
# The trailing question mark tries to avoid broken
# caches and get the most recent version of the page.
- IkiWiki::redirect($cgi, urlto($page, undef).
+ IkiWiki::redirect($cgi, urlto($page).
"?updated#".page_to_id($location));
}
if ($shown) {
if ($template->query(name => 'commentsurl')) {
$template->param(commentsurl =>
- urlto($page, undef).'#comments');
+ urlto($page).'#comments');
}
if ($template->query(name => 'atomcommentsurl') && $config{usedirs}) {
# This will 404 until there are some comments, but I
# think that's probably OK...
$template->param(atomcommentsurl =>
- urlto($page, undef).'comments.atom');
+ urlto($page).'comments.atom');
}
if ($template->query(name => 'commentslink')) {
error(gettext("bad page name"));
}
- my $baseurl = urlto($page, undef);
+ my $baseurl = urlto($page);
my $from;
if (defined $form->field('from')) {
my $previewing=0;
if ($form->submitted eq "Cancel") {
if ($form->field("do") eq "create" && defined $from) {
- redirect($q, urlto($from, undef));
+ redirect($q, urlto($from));
}
elsif ($form->field("do") eq "create") {
redirect($q, baseurl(undef));
}
else {
- redirect($q, urlto($page, undef));
+ redirect($q, $baseurl);
}
exit;
}
@page_locs=$page;
}
else {
- redirect($q, urlto($page, undef));
+ redirect($q, $baseurl);
exit;
}
}
else {
# The trailing question mark tries to avoid broken
# caches and get the most recent version of the page.
- redirect($q, urlto($page, undef)."?updated");
+ redirect($q, $baseurl."?updated");
}
}
)
}
else {
- IkiWiki::redirect($q, urlto($link, undef));
+ IkiWiki::redirect($q, urlto($link));
}
exit;
$imgurl=urlto($imglink, $params{destpage});
}
else {
- $fileurl=urlto($file, undef);
- $imgurl=urlto($imglink, undef);
+ $fileurl=urlto($file);
+ $imgurl=urlto($imglink);
}
if (! exists $params{class}) {
my $oldchoice=$session->param($choice_param);
if (defined $oldchoice && $oldchoice eq $choice) {
# Same vote; no-op.
- IkiWiki::redirect($cgi, urlto($page, undef));
+ IkiWiki::redirect($cgi, urlto($page));
exit;
}
error($@) if $@;
my $cookie = CGI::Cookie->new(-name=> $session->name, -value=> $session->id);
print $cgi->redirect(-cookie => $cookie,
- -url => urlto($page, undef));
+ -url => urlto($page));
exit;
}
}
exit 0;
}
- IkiWiki::redirect($q, urlto($config{recentchangespage}, undef));
+ IkiWiki::redirect($q, urlto($config{recentchangespage}));
exit 0;
}
if (! exists $pagesources{$parent}) {
$parent="index";
}
- IkiWiki::redirect($q, urlto($parent, undef));
+ IkiWiki::redirect($q, urlto($parent));
}
}
else {