Index: branches/5.1.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r14241 -r14338 --- branches/5.1.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 14241) +++ branches/5.1.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 14338) @@ -1,6 +1,6 @@ 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); Index: branches/5.1.x/core/kernel/languages/phrases_cache.php =================================================================== diff -u -N -r14241 -r14338 --- branches/5.1.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 14241) +++ branches/5.1.x/core/kernel/languages/phrases_cache.php (.../phrases_cache.php) (revision 14338) @@ -1,6 +1,6 @@ 'd', 'phrases_label' => '#LABEL#', 'phrases_event' => 'OnPreparePhrase', + 'next_template' => urlencode('external:' . $_SERVER['REQUEST_URI']), 'pass' => 'm,phrases' );