mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 03:19:13 -04:00
Create an ajax response framework that inserts <meta> tags to guard
against UTF-7, and create a $.gallery_autocomplete variant of jQuery's autocomplete that expects the first line to be a <meta> tag and discards it. More complete fix for #1871.
This commit is contained in:
@@ -72,6 +72,7 @@ class Admin_Server_Add_Controller extends Admin_Controller {
|
||||
|
||||
public function autocomplete() {
|
||||
$directories = array();
|
||||
|
||||
$path_prefix = Input::instance()->get("q");
|
||||
foreach (glob("{$path_prefix}*") as $file) {
|
||||
if (is_dir($file) && !is_link($file)) {
|
||||
@@ -79,7 +80,7 @@ class Admin_Server_Add_Controller extends Admin_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
print implode("\n", $directories);
|
||||
ajax::response(implode("\n", $directories));
|
||||
}
|
||||
|
||||
private function _get_admin_form() {
|
||||
|
||||
Reference in New Issue
Block a user