Page MenuHomeIn-Portal Phabricator

D65.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 12:48 AM

D65.diff

Index: branches/5.3.x/core/kernel/utility/unit_config_cloner.php
===================================================================
--- branches/5.3.x/core/kernel/utility/unit_config_cloner.php
+++ branches/5.3.x/core/kernel/utility/unit_config_cloner.php
@@ -66,16 +66,17 @@
/**
* Creates unit configs, based on 'Clones' option.
*
- * @param string $prefix Unit config prefix.
+ * @param string $prefix Unit config prefix.
+ * @param boolean $with_cached Process also cached clones.
*
* @return array
*/
- public function extrude($prefix)
+ public function extrude($prefix, $with_cached = true)
{
$main_config = $this->reader->getUnitConfig($prefix);
$sub_configs = $main_config->getSetting('Clones', array());
- if ( isset($this->clones[$prefix]) ) {
+ if ( $with_cached && isset($this->clones[$prefix]) ) {
$sub_configs = array_merge($sub_configs, $this->clones[$prefix]);
}
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
@@ -478,7 +478,8 @@
$this->runAfterConfigRead($preloaded_prefix);
}
- $clones = $this->cloner->extrude($preloaded_prefix);
+ // Only use cached clones for calls in the middle of initialization (e.g. url parsing).
+ $clones = $this->cloner->extrude($preloaded_prefix, !$this->finalStage);
if ( $this->finalStage ) {
foreach ( $clones as $a_prefix ) {

Event Timeline