From 8971add8493d49ed0e170a2521a62f2f0f39137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sat, 18 Aug 2007 20:03:19 +0000 Subject: #163191 follow up patch by hswong3i and pwolanin: use a has_rows flag where we dont need a counter --- modules/taxonomy/taxonomy.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/taxonomy') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 738448e97..b557a810a 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -983,12 +983,12 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p */ function taxonomy_render_nodes($result) { $output = ''; - $num_rows = 0; + $has_rows = FALSE; while ($node = db_fetch_object($result)) { $output .= node_view(node_load($node->nid), 1); - $num_rows++; + $has_rows = TRUE; } - if ($num_rows > 0) { + if ($has_rows) { $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); } else { -- cgit v1.2.3