- Patch #169899 by Island Usurper: taxonomy caching not always working.

merge-requests/26/head
Dries Buytaert 2008-06-07 13:41:48 +00:00
parent 3ec46f935a
commit 89f115c4f5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}