Index: kernel/languages/phrases_cache.php =================================================================== --- kernel/languages/phrases_cache.php (revision 14318) +++ kernel/languages/phrases_cache.php (working copy) @@ -127,6 +127,7 @@ 'm_opener' => 'd', 'phrases_label' => '#LABEL#', 'phrases_event' => 'OnPreparePhrase', + 'next_template' => urlencode('external:' . $_SERVER['REQUEST_URI']), 'pass' => 'm,phrases' ); Index: units/phrases/phrases_event_handler.php =================================================================== --- units/phrases/phrases_event_handler.php (revision 14318) +++ units/phrases/phrases_event_handler.php (working copy) @@ -48,7 +48,7 @@ */ function CheckPermission(&$event) { - if (!$this->Application->isAdmin && $this->Application->isDebugMode() && constOn('DBG_PHRASES')) { + if (!$this->Application->isAdmin && $this->Application->isDebugMode(false) && constOn('DBG_PHRASES')) { $allow_events = Array ('OnCreate', 'OnUpdate'); if (in_array($event->Name, $allow_events)) { @@ -171,6 +171,13 @@ if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) { $object->SwitchToLive(); } + + $next_template = $this->Application->GetVar('next_template'); + + if ($next_template) { + $event->redirect = $next_template; + $event->SetRedirectParam('opener', 's'); + } } parent::OnCreate($event);