diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 12 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 221373a16..8754d5da3 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -805,11 +805,15 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p * taxonomy_select_nodes(), and formats each node along with a pager. */ function taxonomy_render_nodes($result) { - - while ($node = db_fetch_object($result)) { - $output .= node_view(node_load(array('nid' => $node->nid)), 1); + if (db_num_rows($result) > 0) { + while ($node = db_fetch_object($result)) { + $output .= node_view(node_load(array('nid' => $node->nid)), 1); + } + $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); + } + else { + $output .= t('There are currently no posts in this category.'); } - $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); return $output; } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 221373a16..8754d5da3 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -805,11 +805,15 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p * taxonomy_select_nodes(), and formats each node along with a pager. */ function taxonomy_render_nodes($result) { - - while ($node = db_fetch_object($result)) { - $output .= node_view(node_load(array('nid' => $node->nid)), 1); + if (db_num_rows($result) > 0) { + while ($node = db_fetch_object($result)) { + $output .= node_view(node_load(array('nid' => $node->nid)), 1); + } + $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); + } + else { + $output .= t('There are currently no posts in this category.'); } - $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); return $output; } |