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-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/2b0c8d167e8b98d11e3504393fe4b98596dfd891 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).