Index: branches/5.0.x/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r12972 -r13572 --- branches/5.0.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 12972) +++ branches/5.0.x/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 13572) @@ -1,6 +1,6 @@ SelectParam($params, 'name,render_as,block'); $sections_helper =& $this->Application->recallObject('SectionsHelper'); + /* @var $sections_helper kSectionsHelper */ + $section_data =& $sections_helper->getSectionData($section_name); $params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; @@ -101,24 +103,10 @@ return $ret; } - $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 (isset($section_data['show_mode']) && is_numeric($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 == smNORMAL || ((($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 (!$sections_helper->sectionVisible($section_name)) { + continue; } $params['section_name'] = $section_name; @@ -250,25 +238,13 @@ return ''; } - $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 (isset($section_data['show_mode']) && is_numeric($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 == smNORMAL || ((($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 (!$sections_helper->sectionVisible($section_name)) { + continue; } if (isset($section_data['tabs_only']) && $section_data['tabs_only']) {