function imagepicker_group_search_autocomplete in Image Picker 5.2
Same name and namespace in other branches
- 6.2 imagepicker.admin.inc \imagepicker_group_search_autocomplete()
- 7 imagepicker.admin.inc \imagepicker_group_search_autocomplete()
Retrieve a pipe delimited string of autocomplete suggestions for existing groups
1 string reference to 'imagepicker_group_search_autocomplete'
- imagepicker_menu in ./
imagepicker.module - Implementation of hook_menu().
File
- ./
imagepicker.module, line 4078 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_group_search_autocomplete($string = '') {
$matches = array();
if ($string) {
$result = db_query_range("SELECT group_name FROM {imagepicker_user_groups} WHERE LOWER(group_name) LIKE LOWER('%s%%')", $string, 0, 10);
while ($group = db_fetch_object($result)) {
$matches[$group->group_name] = check_plain($group->group_name);
}
}
print drupal_to_js($matches);
exit;
}