summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.tokens.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:04:24 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-18 00:04:24 +0000
commite18feedfdb429e35173b85fc7182aadabee0a166 (patch)
tree20c8e64d4db97378fad2bc27689b9b88e9390f1f /modules/taxonomy/taxonomy.tokens.inc
parent6a1217aff08d3380658ef47e0e9d9d693683c66a (diff)
downloadbrdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.gz
brdo-e18feedfdb429e35173b85fc7182aadabee0a166.tar.bz2
#564394 by Berdir and Crell: Removed database BC layer. nah nah nah nah... hey hey hey... gooood byeeee...
Diffstat (limited to 'modules/taxonomy/taxonomy.tokens.inc')
-rw-r--r--modules/taxonomy/taxonomy.tokens.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.tokens.inc b/modules/taxonomy/taxonomy.tokens.inc
index fc321700f..f2ee1aac9 100644
--- a/modules/taxonomy/taxonomy.tokens.inc
+++ b/modules/taxonomy/taxonomy.tokens.inc
@@ -124,7 +124,7 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options =
case 'node-count':
$sql = "SELECT COUNT (1) FROM {taxonomy_term_node} tn WHERE tn.tid = :tid";
- $count = db_result(db_query($sql, array(':tid' => $term->tid)));
+ $count = db_query($sql, array(':tid' => $term->tid))->fetchField();
$replacements[$original] = $count;
break;
@@ -172,13 +172,13 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options =
case 'term-count':
$sql = "SELECT COUNT (1) FROM {taxonomy_term_data} td WHERE td.vid = :vid";
- $count = db_result(db_query($sql, array(':vid' => $vocabulary->vid)));
+ $count = db_query($sql, array(':vid' => $vocabulary->vid))->fetchField();
$replacements[$original] = $count;
break;
case 'node-count':
$sql = "SELECT COUNT (1) FROM {taxonomy_term_node} tn LEFT JOIN {taxonomy_term_data} td ON tn.tid = td.tid WHERE td.vid = :vid";
- $count = db_result(db_query($sql, array(':vid' => $vocabulary->vid)));
+ $count = db_query($sql, array(':vid' => $vocabulary->vid))->fetchField();
$replacements[$original] = $count;
break;
}