diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-18 00:04:24 +0000 |
commit | e18feedfdb429e35173b85fc7182aadabee0a166 (patch) | |
tree | 20c8e64d4db97378fad2bc27689b9b88e9390f1f /modules/taxonomy/taxonomy.tokens.inc | |
parent | 6a1217aff08d3380658ef47e0e9d9d693683c66a (diff) | |
download | brdo-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.inc | 6 |
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; } |