Index: branches/5.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r15601 -r15615 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15601) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15615) @@ -1,6 +1,6 @@ 2)); // don't make fatal errors in case if template is missing + $block_params = array_merge($params, Array ('is_silent' => 2)); // don't make fatal errors in case if template is missing $current_template = $this->Application->GetVar('t'); $replace_main = isset($params['replace_m']) && $params['replace_m']; - $skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array(); + $skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array (); $cms_mode = $this->Application->GetVar('admin'); foreach ($this->Application->ModuleInfo as $module_name => $module_data) { $module_key = mb_strtolower($module_name); - if ($module_name == 'In-Portal') { - if (!$cms_mode && $this->Application->isAdmin) { + if ( $module_name == 'In-Portal' ) { + if ( !$cms_mode && $this->Application->isAdmin ) { // don't process In-Portal templates in admin continue; } // Front-End still relies on In-Portal module $module_prefix = $module_data['TemplatePath']; } - elseif ($this->Application->isAdmin) { + elseif ( $this->Application->isAdmin && $module_data['Path'] != 'core/' ) { $module_prefix = $module_key . '/'; // was $module_data['Path']; } else { $module_prefix = $module_data['TemplatePath']; // always have trailing "/" } - if (in_array($module_prefix, $included)) { + if ( in_array($module_prefix, $included) ) { // template by this path was already included by other module (e.g. in-portal used core's template) continue; } - $block_params['t'] = $module_prefix.$this->SelectParam($params, $module_key.'_template,'.$module_key.'_t,template,t'); + $block_params['t'] = $module_prefix . $this->SelectParam($params, $module_key . '_template,' . $module_key . '_t,template,t'); $check_prefix = $module_data['Var']; - if ($check_prefix == 'adm' && $replace_main) { + if ( $check_prefix == 'adm' && $replace_main ) { $check_prefix = 'c'; } - if ($block_params['t'] == $current_template || in_array($check_prefix, $skip_prefixes)) { + if ( $block_params['t'] == $current_template || in_array($check_prefix, $skip_prefixes) ) { continue; } - $no_data = $this->SelectParam($params, $module_key.'_block_no_data,block_no_data'); - if ($no_data) { - $block_params['block_no_data'] = $module_prefix.'/'.$no_data; + $no_data = $this->SelectParam($params, $module_key . '_block_no_data,block_no_data'); + if ( $no_data ) { + $block_params['block_no_data'] = $module_prefix . '/' . $no_data; } $ret .= $this->Application->IncludeTemplate($block_params);