Fix permalinks to recentchanges items and comments, broken by last release.

permalinks always need to be full urls
master
Joey Hess 2011-01-05 15:22:55 -04:00
parent 7a88638c6c
commit 3eabf323f0
3 changed files with 4 additions and 2 deletions

View File

@ -237,7 +237,7 @@ sub preprocess {
}
if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
$pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page})).
$pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page}), undef, 1).
"#".page_to_id($params{page});
}

View File

@ -225,7 +225,7 @@ sub store ($$$) {
wikiname => $config{wikiname},
);
$template->param(permalink => urlto($config{recentchangespage}, undef)."#change-".titlepage($change->{rev}))
$template->param(permalink => urlto($config{recentchangespage}, undef, 1)."#change-".titlepage($change->{rev}))
if exists $config{url};
IkiWiki::run_hooks(pagetemplate => sub {

2
debian/changelog vendored
View File

@ -9,6 +9,8 @@ ikiwiki (3.20101232) UNRELEASED; urgency=low
* Temporarily revert one part of the multiple url support in the last
release. Non-edit pages are now back to having `<base>` set to
the site's main url.
* Fix permalinks to recentchanges items and comments, broken by last
release.
-- Joey Hess <joeyh@debian.org> Tue, 04 Jan 2011 16:00:55 -0400