summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.module12
1 files changed, 8 insertions, 4 deletions
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;
}