Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r4524 -r4528 --- trunk/core/kernel/application.php (.../application.php) (revision 4524) +++ trunk/core/kernel/application.php (.../application.php) (revision 4528) @@ -196,7 +196,7 @@ $rewrite_on = $this->ConfigValue('UseModRewrite'); $admin_on = getArrayValue($_REQUEST, 'admin') || $this->IsAdmin(); - define('MOD_REWRITE', ($rewrite_on || constOn('CMS') ) && !$admin_on ? 1 : 0); + define('MOD_REWRITE', $rewrite_on && !$admin_on ? 1 : 0); $this->Factory = new kFactory(); @@ -535,15 +535,12 @@ $template_cache =& $this->recallObject('TemplatesCache'); $t = $this->GetVar('t'); - if( constOn('CMS') ) - { + if ($this->findModule('Name', 'In-CMS', 'Loaded')) { $cms_handler =& $this->recallObject('cms_EventHandler'); - if( !$template_cache->TemplateExists($t) ) - { + if (!$template_cache->TemplateExists($t)) { $t = $cms_handler->GetDesignTemplate(); } - else - { + else { $cms_handler->SetCatByTemplate(); } }