Index: branches/5.3.x/core/kernel/utility/unit_config_reader.php =================================================================== --- branches/5.3.x/core/kernel/utility/unit_config_reader.php +++ branches/5.3.x/core/kernel/utility/unit_config_reader.php @@ -302,7 +302,7 @@ * * @return array */ - protected function getUnitConfigsWithoutPriority() + public function getUnitConfigsWithoutPriority() { $ret = array(); @@ -320,7 +320,7 @@ * * @return array */ - protected function getUnitConfigsWithPriority() + public function getUnitConfigsWithPriority() { $ret = array(); @@ -440,6 +440,11 @@ */ public function ReReadConfigs() { + if ( $this->storeCache && $this->finalStage ) { + // Building cache right now, so all unit configs are read anyway. + return; + } + // don't reset prefix file, since file scanning could slow down the process $prefix_files_backup = $this->prefixFiles; $this->Application->cacheManager->EmptyUnitCache(); Index: branches/5.3.x/core/units/helpers/sections_helper.php =================================================================== --- branches/5.3.x/core/units/helpers/sections_helper.php +++ branches/5.3.x/core/units/helpers/sections_helper.php @@ -91,30 +91,16 @@ $this->Tree = Array (); // 1. build base tree (don't update parent with children list yet) - - // 1.1. process prefixes without priority - $prioritized_prefixes = Array (); - $prefixes = $this->Application->UnitConfigReader->getPrefixes(); - - foreach ($prefixes as $prefix) { - $config = $this->Application->getUnitConfig($prefix); - - if ( $config->getConfigPriority() !== false ) { - $prioritized_prefixes[$prefix] = $config->getConfigPriority(); - continue; - } - + foreach ( $this->Application->UnitConfigReader->getUnitConfigsWithoutPriority() as $prefix ) { $this->_processPrefixSections($prefix); } - // 2. process prefixes with priority - asort($prioritized_prefixes); - foreach ($prioritized_prefixes as $prefix => $priority) { + foreach ( $this->Application->UnitConfigReader->getUnitConfigsWithPriority() as $prefix ) { $this->_processPrefixSections($prefix); } // 2. apply section adjustments - foreach ($prefixes as $prefix) { + foreach ( $this->Application->UnitConfigReader->getPrefixes() as $prefix ) { $config = $this->Application->getUnitConfig($prefix); $section_adjustments = $config->getSectionAdjustments(); @@ -376,4 +362,4 @@ return $ret; } - } \ No newline at end of file + }