diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-08 12:28:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-08 12:28:27 +0000 |
commit | 16e9b4d0c777404bf1f084391e332ecda0cf27d4 (patch) | |
tree | b2537d51e4e762521a786565d3cba07a53f7b638 /modules/taxonomy.module | |
parent | 7e2e715393b3e168c41754271b91614e10d2bd38 (diff) | |
download | brdo-16e9b4d0c777404bf1f084391e332ecda0cf27d4.tar.gz brdo-16e9b4d0c777404bf1f084391e332ecda0cf27d4.tar.bz2 |
- Patch #42937 by chx: bugfix: added missing db_rewrite_sql() in taxonomy_node_get_terms.
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r-- | modules/taxonomy.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index e0a6cc642..f56fa8338 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -561,7 +561,7 @@ function taxonomy_node_get_terms($nid, $key = 'tid') { static $terms; if (!isset($terms[$nid])) { - $result = db_query('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name', $nid); + $result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $nid); $terms[$nid] = array(); while ($term = db_fetch_object($result)) { $terms[$nid][$term->$key] = $term; |