]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
pagestats: when making a tag cloud, don't emit links where the tag is unused
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 18 Jun 2009 17:25:46 +0000 (18:25 +0100)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Fri, 17 Jul 2009 10:12:45 +0000 (11:12 +0100)
IkiWiki/Plugin/pagestats.pm

index 8ab5d36662ce71716a1733e1a4b5de223c92602b..5dd2f337b4bc1b8822e097f3fcef714ee3c1ac42 100644 (file)
@@ -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).