From: Simon McVittie Date: Thu, 18 Jun 2009 17:25:46 +0000 (+0100) Subject: pagestats: when making a tag cloud, don't emit links where the tag is unused X-Git-Tag: 3.15~73^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b0c8d167e8b98d11e3504393fe4b98596dfd891;p=ikiwiki.git pagestats: when making a tag cloud, don't emit links where the tag is unused --- diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 8ab5d3666..5dd2f337b 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -63,6 +63,8 @@ sub preprocess (@) { my $res = "
\n"; foreach my $page (sort keys %counts) { + next unless $counts{$page} > 0; + my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)]; $res .= "". htmllink($params{page}, $params{destpage}, $page).