diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-08-12 16:12:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-08-12 16:12:00 +0000 |
commit | c17499b6fe5e9b388d09151d2c3525976fde065c (patch) | |
tree | 0203a1d7f6cbeba58fc2056ae4f6c6caa30119d0 /modules/taxonomy | |
parent | b134b023e11902ceae12f3ab861da1f0a2fdbdbd (diff) | |
download | brdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.gz brdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.bz2 |
- Patch #163191 by hswong3i: removed db_num_rows() for compatibility with Oracle and DB2. Also a performance improvement. (Correct version this time.)
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 977c3e8dc..738448e97 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -983,10 +983,12 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p */ function taxonomy_render_nodes($result) { $output = ''; + $num_rows = 0; while ($node = db_fetch_object($result)) { $output .= node_view(node_load($node->nid), 1); + $num_rows++; } - if ($node) { + if ($num_rows > 0) { $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0); } else { |