]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/pagestats.pm
pagestats: when making a tag cloud, don't emit links where the tag is unused
[ikiwiki.git] / 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).