summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-06-11 22:46:20 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-06-11 22:46:20 +0000
commit930f8ca445b3029532cea4bd75b0b63e452b5e88 (patch)
tree7642d2338db956a42ec8a54f2db65fee1250dc5f /modules/taxonomy/taxonomy.module
parent4b462ae3846a669e804d956901d04a478da1671c (diff)
downloadbrdo-930f8ca445b3029532cea4bd75b0b63e452b5e88.tar.gz
brdo-930f8ca445b3029532cea4bd75b0b63e452b5e88.tar.bz2
#61912 by doq and killes, add db_rewrite_sql() to taxonomy/autocomplete.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 24df32228..c2920a7c0 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -1369,7 +1369,7 @@ function taxonomy_autocomplete($vid, $string = '') {
// Fetch last tag
$last_string = trim(array_pop($array));
if ($last_string != '') {
- $result = db_query_range("SELECT name FROM {term_data} WHERE vid = %d AND LOWER(name) LIKE LOWER('%%%s%%')", $vid, $last_string, 0, 10);
+ $result = db_query_range(db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE t.vid = %d AND LOWER(t.name) LIKE LOWER('%%%s%%')", 't', 'tid'), $vid, $last_string, 0, 10);
$prefix = count($array) ? implode(', ', $array) .', ' : '';