diff options
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 1 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.pages.inc | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index d7ee54ba6..a6ea124d0 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -813,6 +813,7 @@ class TaxonomyTermController extends DrupalDefaultEntityController { foreach ($conditions as $key => $condition) { if ($condition['field'] == 'base.name') { $conditions[$key]['operator'] = 'LIKE'; + $conditions[$key]['value'] = db_like($conditions[$key]['value']); } } } diff --git a/modules/taxonomy/taxonomy.pages.inc b/modules/taxonomy/taxonomy.pages.inc index 712e8bc75..4b65472ef 100644 --- a/modules/taxonomy/taxonomy.pages.inc +++ b/modules/taxonomy/taxonomy.pages.inc @@ -102,13 +102,11 @@ function taxonomy_autocomplete($field_name, $tags_typed = '') { if (!empty($tags_typed)) { $query->condition('t.name', $tags_typed, 'NOT IN'); } + // Select rows that match by term name. $tags_return = $query ->fields('t', array('tid', 'name')) ->condition('t.vid', $vids) - // Select rows that match by term name. - ->condition(db_or() - ->where("t.name LIKE :last_string", array(':last_string' => '%' . $tag_last . '%')) - ) + ->condition('t.name', '%' . db_like($tag_last) . '%', 'LIKE') ->range(0, 10) ->execute() ->fetchAllKeyed(); |