Index: trunk/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r8029 -r8078 --- trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8029) +++ trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 8078) @@ -251,14 +251,25 @@ return ''; } - $debug_mode = $this->Application->isDebugMode(); // cache this for 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) { $params['section_name'] = $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; + } } if (isset($section_data['tabs_only']) && $section_data['tabs_only']) {