- Patch #169899 by Island Usurper: taxonomy caching not always working.
parent
3ec46f935a
commit
89f115c4f5
|
@ -904,6 +904,7 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
|
|||
else {
|
||||
$result = db_query(db_rewrite_sql("SELECT t.tid, COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.status = 1 AND n.type = '%s' GROUP BY t.tid"), $type);
|
||||
}
|
||||
$count[$type] = array();
|
||||
while ($term = db_fetch_object($result)) {
|
||||
$count[$type][$term->tid] = $term->c;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue