Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.146
diff -u -r1.146 taxonomy.module
--- modules/taxonomy.module	19 Sep 2004 12:47:00 -0000	1.146
+++ modules/taxonomy.module	20 Sep 2004 18:00:20 -0000
@@ -837,9 +837,6 @@
     }
     $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
   }
-  else {
-    $output .= t('There are currently no posts in this category.');
-  }
   return $output;
 }
 
@@ -899,8 +896,15 @@
         menu_set_location($breadcrumbs);
 
         drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed') .'" />');
+        
+        $result = taxonomy_select_nodes($tids, $operator, $depth, TRUE);
+        if (db_num_rows($result) > 0) {
+          $output .= taxonomy_render_nodes($result);
+        }
+        else {
+          $output .= variable_get('taxonomy_empty_term_message', 'There are currently no posts in this category.');
+        }
 
-        $output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
         print theme('page', $output, $title);
         break;
 
@@ -1031,6 +1035,14 @@
 }
 
 /**
+ * Implementation of hook_settings().
+ */
+function taxonomy_settings() {
+  $output .= form_textfield(t('Empty category message'), 'taxonomy_empty_term_message', variable_get('taxonomy_empty_term_message', 'There are currently no posts in this category.'), 30, 150, t("This message will be displayed when site users visit a category page in which there are no posts.  Leave this field blank to have no message."));
+  return $output;
+}
+
+/**
  * Helper function for array_map purposes.
  */
 function _taxonomy_get_tid_from_term($term) {
