Index: branches/5.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r15173 -r15278 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15173) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15278) @@ -1,6 +1,6 @@ SelectParam($params, 'templ,template,t'); - if ( !getArrayValue($params,'allow_empty') ) - { - $if_true=getArrayValue($params,'true') ? $params['true'] : 1; - $if_false=getArrayValue($params,'false') ? $params['false'] : 0; + $test_templ = $this->SelectParam($params, 'templ,template,t'); + if ( !getArrayValue($params, 'allow_empty') ) { + $if_true = getArrayValue($params, 'true') ? $params['true'] : 1; + $if_false = getArrayValue($params, 'false') ? $params['false'] : 0; } - else - { - $if_true=$params['true']; - $if_false=$params['false']; - } - - if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/i", $this->Application->GetVar('t'))) { - return $if_true; - } else { - return $if_false; + $if_true = $params['true']; + $if_false = $params['false']; } + + $physical_template = $this->Application->getPhysicalTemplate($this->Application->GetVar('t')); + + return preg_match('/^' . str_replace('/', '\/', $test_templ) . '/i', $physical_template) ? $if_true : $if_false; } function IsNotActive($params) Index: branches/5.2.x/core/kernel/managers/url_manager.php =================================================================== diff -u -N -r15137 -r15278 --- branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 15137) +++ branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 15278) @@ -1,6 +1,6 @@ structureTemplateMapping); + $physical_template = array_search($seo_template, $this->structureTemplateMapping); + + if ( $physical_template === false || substr($physical_template, 0, 3) == 'id:' ) { + // physical template from ".smsignore" file OR virtual template + return $seo_template; + } + + list ($physical_template,) = explode(':', $physical_template, 2); // template_path:theme_id => seo_template + + return $physical_template; } /** Index: branches/5.2.x/core/units/helpers/themes_helper.php =================================================================== diff -u -N -r15158 -r15278 --- branches/5.2.x/core/units/helpers/themes_helper.php (.../themes_helper.php) (revision 15158) +++ branches/5.2.x/core/units/helpers/themes_helper.php (.../themes_helper.php) (revision 15278) @@ -1,6 +1,6 @@ Application->getPhysicalTemplate($template_path); + $template_path = $this->Application->getPhysicalTemplate($template_path); - if ( ($physical_template !== false) && (substr($physical_template, 0, 3) != 'id:') ) { - // replace menu template name with it's actual template name on disk - list ($template_path) = explode(':', $physical_template, 2); - } - $sql = 'SELECT FileId FROM ' . TABLE_PREFIX . 'ThemeFiles WHERE ' . $this->getTemplateWhereClause($template_path, $theme_id); Index: branches/5.2.x/core/units/helpers/navigation_bar.php =================================================================== diff -u -N -r15277 -r15278 --- branches/5.2.x/core/units/helpers/navigation_bar.php (.../navigation_bar.php) (revision 15277) +++ branches/5.2.x/core/units/helpers/navigation_bar.php (.../navigation_bar.php) (revision 15278) @@ -1,6 +1,6 @@ Application->GetVar('t'); - $physical_template = $this->Application->getPhysicalTemplate($current_template); - - if ( $physical_template !== false ) { - // replace menu template name with it's actual template name on disk - list ($current_template) = explode(':', $physical_template, 2); - } - - return $current_template; + return $this->Application->getPhysicalTemplate($this->Application->GetVar('t')); } /**