mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
Fix up autocomplete for admin_server_add - found and fixed some bugs
in gallery_autocomplete when "multiple" isn't set. Fixed some harmless syntax issues that js2-mode helpfully pointed out.
This commit is contained in:
@@ -73,14 +73,14 @@ class Admin_Server_Add_Controller extends Admin_Controller {
|
||||
public function autocomplete() {
|
||||
$directories = array();
|
||||
|
||||
$path_prefix = Input::instance()->get("q");
|
||||
$path_prefix = Input::instance()->get("term");
|
||||
foreach (glob("{$path_prefix}*") as $file) {
|
||||
if (is_dir($file) && !is_link($file)) {
|
||||
$directories[] = html::clean($file);
|
||||
$directories[] = (string)html::clean($file);
|
||||
}
|
||||
}
|
||||
|
||||
ajax::response(implode("\n", $directories));
|
||||
ajax::response(json_encode($directories));
|
||||
}
|
||||
|
||||
private function _get_admin_form() {
|
||||
|
||||
Reference in New Issue
Block a user