Index: trunk/core/units/custom_data/custom_data_config.php =================================================================== diff -u -r4762 -r4783 --- trunk/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 4762) +++ trunk/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 4783) @@ -15,7 +15,6 @@ 'ParentPrefix' => 'c', ), - 'n-cdata' => Array( 'TableName' => TABLE_PREFIX.'NewsCustomData', 'ParentPrefix' => 'n', Index: trunk/kernel/units/custom_data/custom_data_config.php =================================================================== diff -u -r4762 -r4783 --- trunk/kernel/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 4762) +++ trunk/kernel/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 4783) @@ -15,7 +15,6 @@ 'ParentPrefix' => 'c', ), - 'n-cdata' => Array( 'TableName' => TABLE_PREFIX.'NewsCustomData', 'ParentPrefix' => 'n', Index: trunk/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -r4782 -r4783 --- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4782) +++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4783) @@ -353,10 +353,11 @@ $main_config =& $this->configData[$prefix]; $sub_configs = getArrayValue($main_config, $config_key); if (!$sub_configs) { - return false; + return array(); } unset($main_config[$config_key]); + $processed = array(); foreach ($sub_configs as $sub_prefix => $sub_config) { if ($config_key == 'AggregateConfigs' && !isset($this->configData[$sub_prefix])) { $this->loadConfig($sub_prefix); @@ -378,12 +379,14 @@ if ($config_key == 'AggregateConfigs') { $this->postProcessConfig($sub_prefix, 'Clones', 'prefix'); } + array_push($processed, $sub_prefix); } if (!$prefix) { // configs, that used only for cloning & not used ifself unset($this->configData[$prefix]); } + return $processed; } function loadConfigFile($filename) @@ -394,29 +397,20 @@ { if ( in_array($filename, get_required_files()) ) return; global $debugger; - /*$debugger->IncludeLevel++; - $before_time = getmicrotime(); - $before_mem = memory_get_usage();*/ if($config_found) { $file = FULL_PATH.$filename; $debugger->ProfileStart('inc_'.crc32($file), $file); include_once($file); $debugger->ProfileFinish('inc_'.crc32($file)); $debugger->profilerAddTotal('includes', 'inc_'.crc32($file)); } - /*$used_time = getmicrotime() - $before_time; - $used_mem = memory_get_usage() - $before_mem; - $debugger->IncludeLevel--; - $debugger->IncludesData['file'][] = str_replace(FULL_PATH, '', $filename); - $debugger->IncludesData['mem'][] = $used_mem; - $debugger->IncludesData['time'][] = $used_time; - $debugger->IncludesData['level'][] = -1;*/ } else { if($config_found) include_once(FULL_PATH.$filename); } + $clones = array(); if($config_found && isset($config) && $config) { $prefix = isset($config['Prefix']) ? $config['Prefix'] : ''; @@ -428,8 +422,9 @@ $this->prefixFiles[$prefix] = $filename; $this->postProcessConfig($prefix, 'AggregateConfigs', 'sub_prefix'); - $this->postProcessConfig($prefix, 'Clones', 'prefix'); + $clones = $this->postProcessConfig($prefix, 'Clones', 'prefix'); } + return $clones; } function loadConfig($prefix) @@ -439,8 +434,11 @@ return ; } $file = $this->prefixFiles[$prefix]; - $this->loadConfigFile($file); - $this->Application->HandleEvent( new kEvent($prefix.':OnAfterConfigRead') ); + $clones = $this->loadConfigFile($file); + array_unshift($clones, $prefix); + foreach ($clones as $a_prefix) { + $this->Application->HandleEvent( new kEvent($a_prefix.':OnAfterConfigRead') ); + } } /**