diff --git a/e107_handlers/menu_class.php b/e107_handlers/menu_class.php
index 3775fb417..b22a9dd87 100644
--- a/e107_handlers/menu_class.php
+++ b/e107_handlers/menu_class.php
@@ -10,9 +10,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
-| $Revision: 1.1 $
-| $Date: 2009-07-16 02:55:19 $
-| $Author: e107coders $
+| $Revision: 1.2 $
+| $Date: 2009-07-16 19:19:07 $
+| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -349,37 +349,36 @@ class menuManager{
$fileList = $efile->get_files(e_PLUGIN,"_menu\.php$",'standard',2);
foreach($fileList as $file)
{
- list($parent_dir) = explode('/',str_replace(e_PLUGIN,"",$file['path']));
- $file['path'] = str_replace(e_PLUGIN,"",$file['path']);
- $file['fname'] = str_replace(".php","",$file['fname']);
- $valid_menu = FALSE;
- $existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
- if (file_exists(e_PLUGIN.$parent_dir."/plugin.xml") ||
- file_exists(e_PLUGIN.$parent_dir."/plugin.php"))
- {
- // include(e_PLUGIN.$parent_dir."/plugin.php");
- if (isset($pref['plug_installed'][$parent_dir]))
- // if ($sql->db_Select("plugin", "*", "plugin_path='".$eplug_folder."' AND plugin_installflag='1' "))
- { // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
- $valid_menu = TRUE; // Whether new or existing, include in list
+ list($parent_dir) = explode('/',str_replace(e_PLUGIN,"",$file['path']));
+ $file['path'] = str_replace(e_PLUGIN,"",$file['path']);
+ $file['fname'] = str_replace(".php","",$file['fname']);
+ $valid_menu = FALSE;
+ $existing_menu = $sql->db_Count("menus", "(*)", "WHERE menu_name='{$file['fname']}'");
+ if (file_exists(e_PLUGIN.$parent_dir.'/plugin.xml') || file_exists(e_PLUGIN.$parent_dir.'/plugin.php'))
+ {
+ if (plugInstalled($parent_dir))
+ { // Its a 'new style' plugin with a plugin.php file, or an even newer one with plugin.xml file - only include if plugin installed
+ $valid_menu = TRUE; // Whether new or existing, include in list
+// echo "Include {$parent_dir}:{$file['fname']}
";
+ }
}
- }
- else
- { // Just add the menu anyway
- $valid_menu = TRUE;
- }
- if ($valid_menu)
- {
- $menustr .= "&".str_replace(".php", "", $file['fname']);
- if (!$existing_menu)
- { // New menu to add to list
- if($sql->db_Insert("menus", " 0, '{$file['fname']}', 0, 0, 0, '' ,'{$file['path']}', ''"))
- {
+ else
+ { // Just add the menu anyway
+ $valid_menu = TRUE;
+// echo "Default Include {$parent_dir}:{$file['fname']}
";
+ }
+ if ($valid_menu)
+ {
+ $menustr .= "&".str_replace(".php", "", $file['fname']);
+ if (!$existing_menu)
+ { // New menu to add to list
+ if($sql->db_Insert("menus", " 0, '{$file['fname']}', 0, 0, 0, '' ,'{$file['path']}', ''"))
+ {
// Could do admin logging here - but probably not needed
- $message .= "".MENLAN_10." - ".$file['fname']."
";
- }
+ $message .= "".MENLAN_10." - ".$file['fname']."
";
+ }
+ }
}
- }
}
//Reorder all menus into 1...x order
@@ -696,7 +695,7 @@ class menuManager{
$text .= "