Index: branches/5.2.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r14989 -r15065 --- branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 14989) +++ branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 15065) @@ -1,6 +1,6 @@ Application->GetVar($event->Prefix . '_label') ) { - $object =& $event->getObject( Array('skip_autoload' => true) ); + $object =& $event->getObject(Array ('skip_autoload' => true)); + /* @var $object kDBItem */ - if ($this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id')) { + if ( $this->Application->GetVar('m_lang') != $this->Application->GetVar('lang_id') ) { $object->SwitchToLive(); } @@ -239,12 +244,14 @@ * Returns to original template after phrase adding/editing * * @param kEvent $event + * @return void + * @access protected */ - function returnToOriginalTemplate(&$event) + protected function returnToOriginalTemplate(kEvent &$event) { $next_template = $this->Application->GetVar('next_template'); - if ($next_template) { + if ( $next_template ) { $event->redirect = $next_template; $event->SetRedirectParam('opener', 's'); } @@ -257,7 +264,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(&$event) + protected function OnBeforeItemCreate(kEvent &$event) { parent::OnBeforeItemCreate($event); @@ -291,7 +298,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(&$event) + protected function OnBeforeItemUpdate(kEvent &$event) { parent::OnBeforeItemUpdate($event); @@ -409,15 +416,17 @@ * Saves changes & changes language * * @param kEvent $event + * @return void + * @access protected */ - function OnPreSaveAndChangeLanguage(&$event) + protected function OnPreSaveAndChangeLanguage(kEvent &$event) { $label = $this->Application->GetVar($event->getPrefixSpecial() . '_label'); - if ($label && !$this->UseTempTables($event)) { + if ( $label && !$this->UseTempTables($event) ) { $phrase_id = $this->_getPhraseId($label); - if ($phrase_id) { + if ( $phrase_id ) { $event->CallSubEvent('OnUpdate'); $event->SetRedirectParam('opener', 's'); } @@ -426,15 +435,15 @@ $event->SetRedirectParam('opener', 's'); } - if ($event->status != kEvent::erSUCCESS) { - return ; + if ( $event->status != kEvent::erSUCCESS ) { + return; } $event->SetRedirectParam($event->getPrefixSpecial() . '_event', 'OnPreparePhrase'); $event->SetRedirectParam('pass_events', true); } - if ($this->Application->GetVar('simple_mode')) { + if ( $this->Application->GetVar('simple_mode') ) { $event->SetRedirectParam('simple_mode', 1); } @@ -446,8 +455,10 @@ * with items selected in the grid * * @param kEvent $event + * @return void + * @access protected */ - function OnEdit(&$event) + protected function OnEdit(kEvent &$event) { parent::OnEdit($event);