summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-06-18 18:25:46 +0100
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-07-17 11:12:45 +0100
commit2b0c8d167e8b98d11e3504393fe4b98596dfd891 (patch)
treecb5c8c04f3076219f1413fce95422a72e8435cd5 /IkiWiki/Plugin
parentf07bb9b48be6b706ddd9fbb368265fce41ac5f6d (diff)
pagestats: when making a tag cloud, don't emit links where the tag is unused
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/pagestats.pm2
1 files changed, 2 insertions, 0 deletions
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 = "<div class='pagecloud'>\n";
foreach my $page (sort keys %counts) {
+ next unless $counts{$page} > 0;
+
my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)];
$res .= "<span class=\"$class\">".
htmllink($params{page}, $params{destpage}, $page).