Index: branches/5.2.x/core/kernel/managers/url_manager.php =================================================================== diff -u -N -r14714 -r14751 --- branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 14714) +++ branches/5.2.x/core/kernel/managers/url_manager.php (.../url_manager.php) (revision 14751) @@ -1,6 +1,6 @@ Application->GetVarDirect('t', 'Get') !== false ) { // template name is passed directly in url (GET method) $t = $this->Application->GetVarDirect('t', 'Get'); } - - // if t was set through env, even in mod_rewrite mode! - if ( $this->Application->GetVar('env') && $this->Application->RewriteURLs() && $this->Application->GetVar('t') ) { + elseif ( $this->Application->GetVar('env') && $this->Application->RewriteURLs() && $this->Application->GetVar('t') ) { + // if t was set through env, even in mod_rewrite mode! $t = $this->Application->GetVar('t'); } - - return preg_replace('/\.tpl$/', '', $t); - } - - /** - * Returns current template, replacing it with default when it's missing - * - * @param string $t - * @return string - * @access public - */ - public function getDefaultTemplate($t) - { - $t = $this->getTemplateName(trim($t, '/')); - - if ( !$t ) { - $t = 'index'; + else { + $t = trim($default_template ? $default_template : 'index', '/'); } - return trim($t, '/'); + return trim(preg_replace('/\.tpl$/', '', $t), '/'); } } \ No newline at end of file