diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2009-06-18 18:25:46 +0100 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2009-07-17 11:12:45 +0100 |
commit | 2b0c8d167e8b98d11e3504393fe4b98596dfd891 (patch) | |
tree | cb5c8c04f3076219f1413fce95422a72e8435cd5 /IkiWiki/Plugin/pagestats.pm | |
parent | f07bb9b48be6b706ddd9fbb368265fce41ac5f6d (diff) | |
download | ikiwiki-2b0c8d167e8b98d11e3504393fe4b98596dfd891.tar ikiwiki-2b0c8d167e8b98d11e3504393fe4b98596dfd891.tar.gz |
pagestats: when making a tag cloud, don't emit links where the tag is unused
Diffstat (limited to 'IkiWiki/Plugin/pagestats.pm')
-rw-r--r-- | IkiWiki/Plugin/pagestats.pm | 2 |
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). |