From f9c157817aaef73e4b760cbf7293cd92d9b02d59 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 9 May 2013 03:27:32 -0700 Subject: [PATCH] Updated to use "SetEnv E_DEV_MENU true" in .htaccess - Experimental code. --- e107_admin/menus.php | 14 ++++++++++---- e107_core/shortcodes/batch/admin_shortcodes.php | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 837594301..cd5e66ed1 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -310,7 +310,7 @@ if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc'])) -if($_SERVER['E_ENV_MENUS'] == 'developer') +if($_SERVER['E_DEV_MENU'] == 'true') { if(isset($_GET['configure']) || isset($_GET['iframe'])) { @@ -325,10 +325,16 @@ if($_SERVER['E_ENV_MENUS'] == 'developer') exit; } -if($_SERVER['E_ENV_MENUS'] == 'developer') -{ +// if($_SERVER['E_DEV_MENU'] == 'true') +//{ function e_help() { + if($_SERVER['E_DEV_MENU'] != 'true') + { + return false; + } + + $p = e107::getPref('e_menu_list'); // new storage for xxxxx_menu.php list. $sql = e107::getDb(); @@ -370,7 +376,7 @@ if($_SERVER['E_ENV_MENUS'] == 'developer') return array('caption'=>'Menu Items','text'=>$text); } -} +//} // XXX Menu Manager Re-Write with drag and drop and multi-dimensional array as storage. ($pref) diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index ee8554026..5f522dd60 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -61,9 +61,8 @@ class admin_shortcodes $ns = e107::getRender(); $pref = e107::getPref(); - if(function_exists('e_help')) // new in v2.x for non-admin-ui admin pages. + if(function_exists('e_help') && ($tmp = e_help())) // new in v2.x for non-admin-ui admin pages. { - $tmp = e_help(); return $ns->tablerender($tmp['caption'],$tmp['text'],'e_help',true); }