Index: branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r8115 -r8170 --- branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8115) +++ branches/unlabeled/unlabeled-1.36.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8170) @@ -151,14 +151,26 @@ return $ret; } - $debug_mode = $this->Application->isDebugMode(); // caching for faster performance + $debug_mode = $this->Application->isDebugMode(); + $super_admin_mode = $this->Application->RecallVar('super_admin'); + ksort($section_data['children'], SORT_NUMERIC); foreach ($section_data['children'] as $section_name) { $section_data =& $sections_helper->getSectionData($section_name); - if (!$debug_mode && isset($section_data['debug_only']) && $section_data['debug_only']) { - // don't show section for debug mode only without debug mode turned on - continue; + + if (isset($section_data['show_mode'])) { + $show_mode = $section_data['show_mode']; + // if super admin section -> show in super admin mode & debug mode + $show_section = (($show_mode & smSUPER_ADMIN) == smSUPER_ADMIN) && ($super_admin_mode || $debug_mode); + if (!$show_section) { + // if section is in debug mode only && debug mode -> show + $show_section = (($show_mode & smDEBUG) == smDEBUG) && $debug_mode; + } + if (!$show_section) { + continue; + } } + $params['section_name'] = $section_name; $ret .= $this->DrawTree($params); $deep_level--;