diff --git a/nodequeue.module b/nodequeue.module index 5ba2f2a..76dd769 100644 --- a/nodequeue.module +++ b/nodequeue.module @@ -1801,8 +1801,9 @@ function nodequeue_api_autocomplete($queue, $subqueue, $string) { if (function_exists($function)) { $where = ""; $where_args = ""; - $where .= " n.type in (:types) AND"; + $where .= "LOWER(n.title) LIKE LOWER(:string) AND n.type in (:types) AND"; $where_args[':types'] = $queue->types; + $where_args[':string'] = '%' . check_plain($string) . '%'; return $function($queue, $subqueue, $string, $where, $where_args); } else {