Index: branches/5.0.x/core/units/sections/site_config_tp.php =================================================================== diff -u -r12343 -r12370 --- branches/5.0.x/core/units/sections/site_config_tp.php (.../site_config_tp.php) (revision 12343) +++ branches/5.0.x/core/units/sections/site_config_tp.php (.../site_config_tp.php) (revision 12370) @@ -1,6 +1,6 @@ Array ('image' => 'show_all', 'title' => 'Design Mode'), ); - $preset_name = $this->Application->ConfigValue('AdminConsoleInterface'); - $base_path = FULL_PATH . ADMIN_DIRECTORY . '/system_presets/' . $preset_name; + $site_config_helper =& $this->Application->recallObject('SiteConfigHelper'); + /* @var $site_config_helper SiteConfigHelper */ - if (file_exists($base_path . DIRECTORY_SEPARATOR . 'settings.php')) { - include_once $base_path . DIRECTORY_SEPARATOR . 'settings.php'; // will get $visible_editing_modes + $settings = $site_config_helper->getSettings(); - foreach ($editing_modes as $editing_mode => $data) { - if (!in_array($editing_mode, $visible_editing_modes)) { - unset($editing_modes[$editing_mode]); - } + foreach ($editing_modes as $editing_mode => $data) { + if (!in_array($editing_mode, $settings['visible_editing_modes'])) { + unset($editing_modes[$editing_mode]); } + } - if (count($editing_modes) == 1) { - // don't show buttons, when there only one left - return ''; - } + if (count($editing_modes) == 1) { + // don't show buttons, when there only one left + return ''; } $ret = '';