diff options
Diffstat (limited to 'modules/g2_import')
-rw-r--r-- | modules/g2_import/controllers/admin_g2_import.php | 6 | ||||
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 4 | ||||
-rw-r--r-- | modules/g2_import/views/admin_g2_import.html.php | 11 |
3 files changed, 8 insertions, 13 deletions
diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index c4f03907..08007b85 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -101,10 +101,10 @@ class Admin_g2_import_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)) { - $file = html::clean($file); + $file = (string)html::clean($file); $directories[] = $file; // If we find an embed.php, include it as well @@ -114,7 +114,7 @@ class Admin_g2_import_Controller extends Admin_Controller { } } - ajax::response(implode("\n", $directories)); + ajax::response(json_encode($directories)); } private function _get_import_form() { diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 70aac747..b155a88a 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -1055,7 +1055,7 @@ class g2_import_Core { if (@copy(g2($derivative->fetchPath()), $item->thumb_path())) { $item->thumb_height = $derivative->getHeight(); $item->thumb_width = $derivative->getWidth(); - $item->thumb_dirty = false; + $item->thumb_dirty = 0; } } @@ -1066,7 +1066,7 @@ class g2_import_Core { if (@copy(g2($derivative->fetchPath()), $item->resize_path())) { $item->resize_height = $derivative->getHeight(); $item->resize_width = $derivative->getWidth(); - $item->resize_dirty = false; + $item->resize_dirty = 0; } } } diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php index 22e19f5b..adde83ce 100644 --- a/modules/g2_import/views/admin_g2_import.html.php +++ b/modules/g2_import/views/admin_g2_import.html.php @@ -1,14 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<?= $theme->css("jquery.autocomplete.css") ?> -<?= $theme->script("jquery.autocomplete.js") ?> <script type="text/javascript"> $("document").ready(function() { $("form input[name=embed_path]").gallery_autocomplete( "<?= url::site("__ARGS__") ?>".replace("__ARGS__", "admin/g2_import/autocomplete"), - { - max: 256, - loadingClass: "g-loading-small", - }); + {}); }); </script> @@ -25,9 +20,9 @@ $("document").ready(function() { .tabs("disable", 1) .tabs("disable", 2) <? elseif ($g3_resource_count > .9 * $g2_resource_count): ?> - .tabs("select", 2) + .tabs({active: 2}) <? else: ?> - .tabs("select", 1) + .tabs({active: 1}) <? endif ?> ; |