diff options
author | Nathan Kinkade <nath@nkinka.de> | 2012-05-12 13:06:18 +0000 |
---|---|---|
committer | Nathan Kinkade <nath@nkinka.de> | 2012-05-12 13:06:18 +0000 |
commit | f5098f54b8279f468d94747b1156e15ea05d6d25 (patch) | |
tree | 2ecfb6663887ffbc72de8f231864b6c78bd62640 /modules/server_add/controllers/admin_server_add.php | |
parent | a13fd7f373f3718037a2ce90a3cb408f24856602 (diff) | |
parent | d1390bd87db1a7e59bbd72f5991fbbc6374c98b4 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/server_add/controllers/admin_server_add.php')
-rw-r--r-- | modules/server_add/controllers/admin_server_add.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 0c741513..954c9ef6 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -35,12 +35,12 @@ class Admin_Server_Add_Controller extends Admin_Controller { $form = $this->_get_admin_form(); $paths = unserialize(module::get_var("server_add", "authorized_paths", "a:0:{}")); if ($form->validate()) { - if (is_link($form->add_path->path->value)) { + $path = html_entity_decode($form->add_path->path->value); + if (is_link($path)) { $form->add_path->path->add_error("is_symlink", 1); - } else if (!is_readable($form->add_path->path->value)) { + } else if (!is_readable($path)) { $form->add_path->path->add_error("not_readable", 1); } else { - $path = $form->add_path->path->value; $paths[$path] = 1; module::set_var("server_add", "authorized_paths", serialize($paths)); message::success(t("Added path %path", array("path" => $path))); @@ -75,7 +75,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { $path_prefix = Input::instance()->get("q"); foreach (glob("{$path_prefix}*") as $file) { if (is_dir($file) && !is_link($file)) { - $directories[] = $file; + $directories[] = html::clean($file); } } |