"</p>");
}
else {
- if (defined pagetype($link)) {
- IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
- }
- else {
- IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".$link));
- }
+ IkiWiki::redirect($cgi, urlto($link, undef, 1));
}
exit;
sub store ($$$) { #{{{
my $change=shift;
- my $page="$config{recentchangespage}/change_".IkiWiki::titlepage($change->{rev});
+ my $page="$config{recentchangespage}/change_".titlepage($change->{rev});
# Optimisation to avoid re-writing pages. Assumes commits never
# change (or that any changes are not important).
page => $_->{page}
).
"\">".
- IkiWiki::pagetitle($_->{page}).
+ pagetitle($_->{page}).
"</a>"
}
else {
- $_->{link} = IkiWiki::pagetitle($_->{page});
+ $_->{link} = pagetitle($_->{page});
}
$_->{baseurl}="$config{url}/" if length $config{url};
$template->param(
%$change,
commitdate => displaytime($change->{when}, "%X %x"),
+ commitdate_raw => scalar localtime($change->{when}),
wikiname => $config{wikiname},
);
+
+ $template->param(permalink => "$config{url}/$config{recentchangespage}/#change-".titlepage($change->{rev}))
+ if exists $config{url};
+
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
template => $template, rev => $change->{rev});