diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-03 19:53:23 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-03 19:53:23 +0000 |
commit | 92065444d982a443d3862f9ce5094bd32faffb85 (patch) | |
tree | 5eb504ad535f880a1ddaad3c27224d31a2c24d5f /IkiWiki/CGI.pm | |
parent | 22b414ddc0d0e35ad94c60c96a8ac2c8c5e267d5 (diff) | |
download | ikiwiki-92065444d982a443d3862f9ce5094bd32faffb85.tar ikiwiki-92065444d982a443d3862f9ce5094bd32faffb85.tar.gz |
* Simplify the data structure returned by rcs_recentchanges to avoid
each rcs plugin needing to form complex strings on its own.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 16 |
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; |