Index: branches/RC/core/units/general/helpers/sections_helper.php =================================================================== diff -u -N -r9258 -r9776 --- branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 9258) +++ branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 9776) @@ -33,24 +33,20 @@ */ function BuildTree() { - $unit_config_reader = false; $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); if ($data) { $this->Tree = unserialize($data['Data']); return ; } - $this->Application->UnitConfigReader->includeConfigFiles(MODULES_PATH); - $this->Application->UnitConfigReader->AfterConfigRead(); + $this->Application->UnitConfigReader->ReReadConfigs(); + $this->Tree = Array(); - if (!$unit_config_reader) { - $unit_config_reader =& $this->Application->recallObject('kUnitConfigReader'); - } // 1. build base tree (don't update parent with children list yet) - $prefixes = array_keys($unit_config_reader->configData); + $prefixes = array_keys($this->Application->UnitConfigReader->configData); foreach ($prefixes as $prefix) { - $config =& $unit_config_reader->configData[$prefix]; + $config =& $this->Application->UnitConfigReader->configData[$prefix]; $sections = getArrayValue($config, 'Sections'); if (!$sections) continue; @@ -100,7 +96,7 @@ // 2. apply section ajustments foreach ($prefixes as $prefix) { - $config =& $unit_config_reader->configData[$prefix]; + $config =& $this->Application->UnitConfigReader->configData[$prefix]; $section_ajustments = getArrayValue($config, 'SectionAdjustments'); if (!$section_ajustments) continue; Index: branches/RC/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -N -r9234 -r9776 --- branches/RC/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 9234) +++ branches/RC/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 9776) @@ -230,7 +230,7 @@ } } - function AfterConfigRead() + function AfterConfigRead($store_cache = null) { // if (!$this->ProcessAllConfigs) return ; $this->FinalStage = true; @@ -240,12 +240,17 @@ $this->AfterConfigProcessed[] = $prefix; } - if ($this->StoreCache || (defined('IS_INSTALL') && IS_INSTALL)) { + if (!isset($store_cache)) { + // store cache not overrided -> use global setting + $store_cache = $this->StoreCache; + } + + if ($store_cache || (defined('IS_INSTALL') && IS_INSTALL)) { // cache is not stored during install, but dynamic clones should be processed in any case $this->processDynamicClones(); } - if ($this->StoreCache) { + if ($store_cache) { $this->CacheParsedData(); if ($this->Application->isDebugMode(false) && constOn('DBG_VALIDATE_CONFIGS')) { @@ -281,7 +286,7 @@ $this->ProcessAllConfigs = true; $this->includeConfigFiles(MODULES_PATH, false); $this->ParseConfigs(); - $this->AfterConfigRead(); + $this->AfterConfigRead(false); $this->processDynamicClones(); }