From 276d4a52f46d1c6ffdf18b6c95397e9907383042 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 12 Jan 2017 17:36:00 -0800 Subject: [PATCH] Fix for Menu-Manager not display Menu area under some circumstances. --- e107_admin/menus.php | 19 +++++++++++-------- e107_handlers/menumanager_class.php | 10 +++++++--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 1fb39bdaf..7fb37e402 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -16,15 +16,18 @@ if(isset($_GET['configure'])) define("USER_AREA", true); //Switch to desired layout define('THEME_LAYOUT', $_GET['configure']); - define('e_DEBUG', false); - define('E107_DEBUG_LEVEL', 0); - if(function_exists('xdebug_disable')) - { - xdebug_disable(); - } - @ini_set('display_errors', 0); - error_reporting(0); + if(empty($_GET['debug'])) + { + define('e_DEBUG', false); + define('E107_DEBUG_LEVEL', 0); + if(function_exists('xdebug_disable')) + { + xdebug_disable(); + } + @ini_set('display_errors', 0); + error_reporting(0); + } define('e_MENUMANAGER_ACTIVE', true); } diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php index 7fc50588b..a6ece27e4 100644 --- a/e107_handlers/menumanager_class.php +++ b/e107_handlers/menumanager_class.php @@ -1489,10 +1489,11 @@ class e_menuManager { } else if(strstr($str, "MENU")) { - + $matches = array(); if(preg_match_all("/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/", $str, $matches)) { + $menuText = ""; foreach($matches[1] as $menu) { @@ -1501,7 +1502,7 @@ class e_menuManager { { $menuText .= $sc_style['MENU']['pre']; } - + // --------------- $menuText .= "\n\n"; @@ -1569,10 +1570,13 @@ class e_menuManager { } - $ns->tablerender('', varset($menuText)); + echo $menuText; + + // $ns->tablerender('', varset($menuText)); // Could fail with a badly built theme. } else { + echo $tp->parseTemplate($str,true); }