Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r11346 -r11495 --- branches/RC/core/kernel/application.php (.../application.php) (revision 11346) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 11495) @@ -538,7 +538,9 @@ { static $theme_id = 0; - if($theme_id > 0) return $theme_id; + if ($theme_id > 0) { + return $theme_id; + } if (constOn('DBG_FORCE_THEME')) { $theme_id = DBG_FORCE_THEME; @@ -554,6 +556,7 @@ WHERE (PrimaryTheme = 1) AND (Enabled = 1)'; $theme_id = $this->Conn->GetOne($sql); } + return $theme_id; } @@ -801,6 +804,8 @@ // hide debug output from ajax requests automatically define('DBG_SKIP_REPORTING', 1); } + + define('EDITING_MODE', 0); // user can't edit anything } elseif ($this->GetVar('admin')) { // viewing front-end through admin's frame @@ -818,31 +823,25 @@ // user can't edit anything define('EDITING_MODE', 0); } + } else { + define('EDITING_MODE', 0); // user can't edit anything } if (!$this->RequestProcessed) $this->ProcessRequest(); $this->InitParser(); $t = $this->GetVar('t'); - if ($this->isModuleEnabled('In-Edit')) { - $cms_handler =& $this->recallObject('cms_EventHandler'); - if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) { - $t = $cms_handler->GetDesignTemplate(); - } - /*else { - $cms_handler->SetCatByTemplate(); - }*/ - } + $cms_handler =& $this->recallObject('st_EventHandler'); + /* @var $cms_handler CategoriesEventHandler */ - if ($this->isModuleEnabled('Proj-CMS')) { - $cms_handler =& $this->recallObject('st_EventHandler'); - if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) { - $t = $cms_handler->GetDesignTemplate(); - } + if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) { + $t = $cms_handler->GetDesignTemplate(); } + /*else { + $cms_handler->SetCatByTemplate(); + }*/ - if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) { $this->Debugger->appendMemoryUsage('Application before Parsing:'); }