Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r11495 -r11501 --- branches/RC/core/kernel/application.php (.../application.php) (revision 11495) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 11501) @@ -804,8 +804,6 @@ // 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 @@ -819,14 +817,10 @@ $editing_mode = $this->GetVar('editing_mode'); define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_CMS); } - else { - // user can't edit anything - define('EDITING_MODE', 0); - } - } else { - define('EDITING_MODE', 0); // user can't edit anything } + safeDefine('EDITING_MODE', 0); // user can't edit anything + if (!$this->RequestProcessed) $this->ProcessRequest(); $this->InitParser(); @@ -837,6 +831,10 @@ if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) { $t = $cms_handler->GetDesignTemplate(); + + if ($this->isDebugMode()) { + $this->Debugger->appendHTML('Design Template: ' . $t . '; CategoryID: ' . $this->GetVar('m_cat_id')); + } } /*else { $cms_handler->SetCatByTemplate();