summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-10-17 21:54:42 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-10-17 21:54:42 -0400
commit35c56622ea56c7d97299faba5e72b5a67fa25c66 (patch)
tree1611695ae2367c2321e8df957781f44ef17f345d /IkiWiki
parentfdb5da46b0122d9cb4b2611526c6c955478a80cf (diff)
tweak recentchanges permalink code
Need to handle the case where url is not set.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/recentchanges.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index d0e4176ff..e124a4540 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -115,8 +115,6 @@ sub store ($$$) { #{{{
my $change=shift;
my $page="$config{recentchangespage}/change_".titlepage($change->{rev});
- my $baseurl = IkiWiki::baseurl();
- my $permalink="$baseurl$config{recentchangespage}/#change-".titlepage($change->{rev});
# Optimisation to avoid re-writing pages. Assumes commits never
# change (or that any changes are not important).
@@ -177,8 +175,11 @@ sub store ($$$) { #{{{
commitdate => displaytime($change->{when}, "%X %x"),
commitdate_raw => scalar localtime($change->{when}),
wikiname => $config{wikiname},
- permalink => $permalink,
);
+
+ $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});