Index: branches/5.3.x/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -N -r16280 -r16395 --- branches/5.3.x/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 16280) +++ branches/5.3.x/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 16395) @@ -1,6 +1,6 @@ Application->cacheManager->applyDelayedUnitProcessing(); + + if ( !$this->Application->InitDone && $cache ) { + // Allow hooks to modify "m:QueryString" before URL parsing is started during cold start. + $this->runAfterConfigRead('m'); + } } /** @@ -181,14 +186,24 @@ */ protected function includeConfigFiles($folder_path, $cache = true) { + $data = false; $this->Application->refreshModuleInfo(); - if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { - $data = $this->Application->getCache('master:config_files', false, $cache ? CacheSettings::$unitCacheRebuildTime : 0); + if ( $cache ) { + if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) { + $data = $this->Application->getCache( + 'master:config_files', + false, + CacheSettings::$unitCacheRebuildTime + ); + } + else { + $data = $this->Application->getDBCache( + 'config_files', + CacheSettings::$unitCacheRebuildTime + ); + } } - else { - $data = $this->Application->getDBCache('config_files', $cache ? CacheSettings::$unitCacheRebuildTime : 0); - } if ( $data ) { $this->configFiles = unserialize($data); @@ -485,8 +500,9 @@ { $preloaded_prefix = $this->PreloadConfigFile($this->getPrefixFile($prefix)); - if ( $this->finalStage ) { - // run prefix OnAfterConfigRead so all hooks to it can define their clones + if ( $this->finalStage || $prefix == 'm' ) { + // Run prefix OnAfterConfigRead so all hooks to it can define their clones. + // Allow hooks to modify "m:QueryString" before URL parsing is started during warm start. $this->runAfterConfigRead($preloaded_prefix); }