Description: Display only terms with at least 1 node
Author: l3on

--- taxonomy_block.module	2012-08-28 17:38:38.830195072 +0200
+++ taxonomy_block.module.new	2012-08-28 17:44:47.896025174 +0200
@@ -185,9 +185,10 @@
   
   foreach ($hierarchy as $term) {
     $title = $term->name;
-    
+    $count = taxonomy_block_count_nodes_term($term->tid); 
+
     if ($show_counts) {
-      $title .= t(' (@count)', array('@count' => taxonomy_block_count_nodes_term($term->tid)));
+      $title .= t(' (@count)', array('@count' => $count));
     }
     
     $item = l($title, 'taxonomy/term/' . $term->tid);
@@ -195,8 +196,9 @@
     if (!empty($term->children)) {
       $item .= taxonomy_block_generate_list($term->children, $show_counts);
     }
-    
-    $items[] = $item;
+
+    if ($count != 0)
+        $items[] = $item;
   }
   
   return theme('item_list', array('items' => $items));
