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)