--- taxonomy.module-4.5.2 2004-12-24 00:49:46.000000000 -0600 +++ taxonomy.module 2005-01-22 03:47:03.000000000 -0600 @@ -642,7 +642,7 @@ if (!isset($count[$type])) { // $type == 0 always evaluates true is $type is a string if (is_numeric($type)) { - $result = db_query('SELECT t.tid, COUNT(DISTINCT(n.nid)) AS c FROM {term_node} t '. node_access_join_sql() .'INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND '. node_access_where_sql() .'GROUP BY t.tid'); + $result = db_query('SELECT t.tid, COUNT(DISTINCT(n.nid)) AS c FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid '. node_access_join_sql() .' WHERE n.status = 1 AND '. node_access_where_sql() .'GROUP BY t.tid'); } else { $result = db_query("SELECT t.tid, COUNT(DISTINCT(n.nid)) AS c FROM {term_node} t, {node} n ". node_access_join_sql() ." WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' AND ". node_access_where_sql() ." GROUP BY t.tid", $type);