Index: trunk/core/kernel/application.php =================================================================== diff -u -r1677 -r1688 --- trunk/core/kernel/application.php (.../application.php) (revision 1677) +++ trunk/core/kernel/application.php (.../application.php) (revision 1688) @@ -336,10 +336,13 @@ if (defined('CMS') && CMS) { + $cms_handler =& $this->recallObject('cms_EventHandler'); if (!$template_cache->TemplateExists($t)) { - $cms_handler =& $this->recallObject('cms_EventHandler'); $t = $cms_handler->GetDesignTemplate(); } + else { + $cms_handler->SetCatByTemplate(); + } } if (defined('DEBUG_MODE') && DEBUG_MODE && dbg_ConstOn('DBG_PROFILE_MEMORY') ) { Index: trunk/admin/include/sections.php =================================================================== diff -u -r1611 -r1688 --- trunk/admin/include/sections.php (.../sections.php) (revision 1611) +++ trunk/admin/include/sections.php (.../sections.php) (revision 1688) @@ -83,8 +83,10 @@ function IsKernel4Link() { $path = $this->Get('path'); if(!$path) return false; + + $file = $this->Get('file'); - return ( strpos($path, 'index4.php') !== false) ? true : false; + return ( strpos($path, 'index4.php') !== false || strpos($file, 'kernel4:') !== false) ? true : false; } function URL()