Index: branches/5.3.x/core/units/helpers/sections_helper.php =================================================================== diff -u -N -r15483 -r15698 --- branches/5.3.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 15483) +++ branches/5.3.x/core/units/helpers/sections_helper.php (.../sections_helper.php) (revision 15698) @@ -1,6 +1,6 @@ Application->UnitConfigReader->configData); + $prefixes = $this->Application->UnitConfigReader->getPrefixes(); foreach ($prefixes as $prefix) { - $config =& $this->Application->UnitConfigReader->configData[$prefix]; + $config = $this->Application->getUnitConfig($prefix); - if ( array_key_exists('ConfigPriority', $config) ) { - $prioritized_prefixes[$prefix] = $config['ConfigPriority']; + if ( $config->getConfigPriority() !== false ) { + $prioritized_prefixes[$prefix] = $config->getConfigPriority(); continue; } @@ -115,10 +115,10 @@ // 2. apply section adjustments foreach ($prefixes as $prefix) { - $config =& $this->Application->UnitConfigReader->configData[$prefix]; - $section_adjustments = getArrayValue($config, 'SectionAdjustments'); - /* @var $section_adjustments Array */ + $config = $this->Application->getUnitConfig($prefix); + $section_adjustments = $config->getSectionAdjustments(); + if ( !$section_adjustments ) { continue; } @@ -176,7 +176,8 @@ } } else { - $module_folder = $this->Application->getUnitOption($section_params['SectionPrefix'], 'ModuleFolder'); + $module_folder = $this->Application->getUnitConfig($section_params['SectionPrefix'])->getModuleFolder(); + if ( !array_key_exists('icon_module', $section_params) ) { // set "icon_module" used in "combined_header" block $this->Tree[$section_name]['icon_module'] = $this->Application->findModule('Path', $module_folder . '/', 'Name'); @@ -211,9 +212,8 @@ function _processPrefixSections($prefix) { - $config =& $this->Application->UnitConfigReader->configData[$prefix]; - $sections = getArrayValue($config, 'Sections'); - /* @var $sections Array */ + $config = $this->Application->getUnitConfig($prefix); + $sections = $config->getSections(); if ( !$sections ) { return ; @@ -224,8 +224,8 @@ if ( isset($section_params['SectionPrefix']) ) { $section_prefix = $section_params['SectionPrefix']; } - elseif ( $this->Application->getUnitOption($prefix, 'SectionPrefix') ) { - $section_prefix = $this->Application->getUnitOption($prefix, 'SectionPrefix'); + elseif ( $this->Application->getUnitConfig($prefix)->getSectionPrefix() ) { + $section_prefix = $this->Application->getUnitConfig($prefix)->getSectionPrefix(); } else { $section_prefix = $prefix; @@ -245,7 +245,7 @@ $section_params['url']['section'] = $section_name; if ( !isset($section_params['url']['module']) ) { - $module_name = $this->Application->findModule('Path', $config['ModuleFolder'] . '/', 'Name'); + $module_name = $this->Application->findModule('Path', $config->getModuleFolder() . '/', 'Name'); $section_params['url']['module'] = $module_name; } } @@ -371,8 +371,9 @@ if ($section_data && isset($section_data['perm_prefix'])) { // this section uses other section permissions - $ret = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); + $ret = $this->Application->getUnitConfig($section_data['perm_prefix'])->getPermSectionByName('main'); } + return $ret; } } \ No newline at end of file