summaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 99fc5c0ed..6e1efbd69 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -76,12 +76,26 @@ sub cgi_recentchanges ($) { #{{{
eval q{use Memoize};
memoize("htmllink");
+ eval q{use Time::Duration};
+
+ my $changelog=[rcs_recentchanges(100)];
+ foreach my $change (@$changelog) {
+ $change->{when} = concise(ago($change->{when}));
+ $change->{user} = htmllink("", "", $change->{user}, 1);
+ $change->{pages} = [
+ map {
+ $_->{link} = htmllink("", "", $_->{page}, 1);
+ $_;
+ } @{$change->{pages}}
+ ];
+ }
+
my $template=template("recentchanges.tmpl");
$template->param(
title => "RecentChanges",
indexlink => indexlink(),
wikiname => $config{wikiname},
- changelog => [rcs_recentchanges(100)],
+ changelog => $changelog,
baseurl => baseurl(),
);
print $q->header(-charset => 'utf-8'), $template->output;