diff --git a/e107_admin/menus.php b/e107_admin/menus.php
index 6392ed32e..f88b81726 100644
--- a/e107_admin/menus.php
+++ b/e107_admin/menus.php
@@ -383,7 +383,13 @@ if($_SERVER['E_DEV_MENU'] == 'true')
$text .= "
";
}
@@ -784,9 +790,23 @@ class e_layout
foreach($files as $file)
{
- $path = trim(str_replace(e_PLUGIN,"",$file['path']),"/");
+ $valid_menu = false;
- // if(e107::isInstalled($path) )
+ if (file_exists($file['path'].'/plugin.xml') || file_exists($file['path'].'/plugin.php'))
+ {
+ if (e107::isInstalled($parent_dir))
+ {
+ $valid_menu = TRUE; // Whether new or existing, include in list
+ }
+ }
+ else // Just add the menu anyway
+ {
+ $valid_menu = TRUE;
+ }
+
+ $path = trim(str_replace(e_PLUGIN,"",$file['path']),"/");
+
+ if($valid_menu)
{
$fname = str_replace(".php","",$file['fname']);
$data[$fname] = $path;