tags 562129 patch thanks On Wednesday 23 December 2009 01:29:02, David Paleino wrote: > On Wednesday 23 December 2009 01:21:04, Debian Bug Tracking System wrote: > > Thank you for filing a new Bug report with Debian. > > Err, sorry, seems like my patch is broken, but I'm too tired now to look at > it again. De-tagging patch, will think at it again tomorrow morning.
..and, I obviously couldn't sleep without fixing this before. Good patch attached, sorry for the big noise. David -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
From: David Paleino <[email protected]> Subject: implement a "maxcount" option to pagestats, to limit the number of shown pages to the most popular "n" --- /usr/share/perl5/IkiWiki/Plugin/pagestats.pm 2009-12-06 20:55:09.000000000 +0100 +++ .ikiwiki/IkiWiki/Plugin/pagestats.pm 2009-12-23 01:42:36.000000000 +0100 @@ -77,6 +77,18 @@ # In case of misspelling, default to a page cloud my $res = "<div class='pagecloud'>\n"; + + if (exists $params{maxcount}) { + my $i = 0; + my %goods; + foreach my $page (sort { $counts{$b} <=> $counts{$a} } keys %counts) { + if ($i++ < $params{maxcount}) { + $goods{$page} = $counts{$page}; + } + } + %counts = %goods; + } + foreach my $page (sort keys %counts) { next unless $counts{$page} > 0;
signature.asc
Description: This is a digitally signed message part.

