From 2b0c8d167e8b98d11e3504393fe4b98596dfd891 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 18 Jun 2009 18:25:46 +0100 Subject: [PATCH] pagestats: when making a tag cloud, don't emit links where the tag is unused --- IkiWiki/Plugin/pagestats.pm | 2 ++ 1 file changed, 2 insertions(+) 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). -- 2.45.0