From 8533420f5d307e81a90c3d26a75b666350aee0f2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 24 Apr 2011 22:55:01 -0700 Subject: Look for and return embed.php files in the autocomplete list if we can find them. Fixes #1708. --- modules/g2_import/controllers/admin_g2_import.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/g2_import') diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index cf68d911..5c4995c9 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -100,6 +100,11 @@ class Admin_g2_import_Controller extends Admin_Controller { foreach (glob("{$path_prefix}*") as $file) { if (is_dir($file) && !is_link($file)) { $directories[] = $file; + + // If we find an embed.php, include it as well + if (file_exists("$file/embed.php")) { + $directories[] = "$file/embed.php"; + } } } -- cgit v1.2.3