--- taxonomy.module.old	Tue Jul 19 23:31:03 2005
+++ taxonomy.module	Fri Nov  4 17:28:10 2005
@@ -818,10 +818,12 @@
  * @param $pager
  *   Whether the nodes are to be used with a pager (the case on most Drupal
  *   pages) or not (in an XML feed, for example).
+ * @param $limit
+ *   Limit of nodes when you're not using $pager. 0 means no limit.
  * @return
  *   A resource identifier pointing to the query results.
  */
-function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $pager = TRUE) {
+function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $pager = TRUE, $limit = 0) {
   if (count($tids) > 0) {
     // For each term ID, generate an array of descendant term IDs to the right depth.
     $descendant_tids = array();
@@ -855,7 +857,11 @@
       $result = pager_query($sql, variable_get('default_nodes_main', 10), 0, $sql_count);
     }
     else {
-      $result = db_query_range($sql, 0, 15);
+      if ($limit) {
+        $result = db_query_range($sql, 0, $limit);
+      } else { 
+        $result = db_query($sql);
+      }
     }
   }
 
