aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-14 03:12:30 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-14 03:12:30 +0000
commit3ef0a6781191b8e543390f5663a4d9001d5afd6d (patch)
tree9a733cb8b501b3d8fa1059b5b1a3d04083b9db44 /IkiWiki
parentf27a462b185ef571d16e467be70123f46f9ae990 (diff)
downloadikiwiki-3ef0a6781191b8e543390f5663a4d9001d5afd6d.tar
ikiwiki-3ef0a6781191b8e543390f5663a4d9001d5afd6d.tar.gz
* Patch from Recai to limit recentchanges to displaying max 10 files for a
given changeset (to avoid large number of file changes excessively bloating the page).
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 53eda2158..fe89e2758 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -83,12 +83,16 @@ sub cgi_recentchanges ($) { #{{{
foreach my $change (@$changelog) {
$change->{when} = concise(ago($change->{when}));
$change->{user} = htmllink("", "", escapeHTML($change->{user}), 1);
+
+ my $is_excess = exists $change->{pages}[10]; # limit pages to first 10
+ delete @{$change->{pages}}[10 .. @{$change->{pages}}] if $is_excess;
$change->{pages} = [
map {
$_->{link} = htmllink("", "", $_->{page}, 1);
$_;
} @{$change->{pages}}
];
+ push @{$change->{pages}}, { link => '...' } if $is_excess;
}
my $template=template("recentchanges.tmpl");