summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-03-13 21:20:51 +0000
committerDries Buytaert <dries@buytaert.net>2005-03-13 21:20:51 +0000
commit1c4419c4392e360fecbe613240e5f15cb9fcf5e0 (patch)
treed3b393fea21afcd0ac1010cdb8ba0f46e6a25f20
parent3b70f0015f27f325036a708772fadbe381fe788f (diff)
downloadbrdo-1c4419c4392e360fecbe613240e5f15cb9fcf5e0.tar.gz
brdo-1c4419c4392e360fecbe613240e5f15cb9fcf5e0.tar.bz2
- Patch #18696 by Morbus: one '(' too much in taxonomy_term_count_nodes().
-rw-r--r--modules/taxonomy.module2
-rw-r--r--modules/taxonomy/taxonomy.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 9c2771d50..6059c1e11 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -676,7 +676,7 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
$result = db_query(db_rewrite_sql('SELECT t.tid, COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 GROUP BY t.tid'));
}
else {
- $result = db_query(db_rewrite_sql("SELECT t.tid, COUNT((n.nid) AS c FROM {term_node} t, {node} n WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' GROUP BY t.tid"), $type);
+ $result = db_query(db_rewrite_sql("SELECT t.tid, COUNT(n.nid) AS c FROM {term_node} t, {node} n WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' GROUP BY t.tid"), $type);
}
while ($term = db_fetch_object($result)) {
$count[$type][$term->tid] = $term->c;
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 9c2771d50..6059c1e11 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -676,7 +676,7 @@ function taxonomy_term_count_nodes($tid, $type = 0) {
$result = db_query(db_rewrite_sql('SELECT t.tid, COUNT(n.nid) AS c FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 GROUP BY t.tid'));
}
else {
- $result = db_query(db_rewrite_sql("SELECT t.tid, COUNT((n.nid) AS c FROM {term_node} t, {node} n WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' GROUP BY t.tid"), $type);
+ $result = db_query(db_rewrite_sql("SELECT t.tid, COUNT(n.nid) AS c FROM {term_node} t, {node} n WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' GROUP BY t.tid"), $type);
}
while ($term = db_fetch_object($result)) {
$count[$type][$term->tid] = $term->c;