Index: branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php =================================================================== diff -u -r15045 -r15065 --- branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 15045) +++ branches/5.2.x/core/units/forms/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 15065) @@ -1,6 +1,6 @@ status != kEvent::erSUCCESS) { - return ; + if ( $event->status != kEvent::erSUCCESS ) { + return; } $object =& $event->getObject(); @@ -240,7 +242,7 @@ $notify_email = $form->GetDBField('SubmitNotifyEmail'); - if ($notify_email) { + if ( $notify_email ) { $send_params = Array ( 'to_name' => $notify_email, 'to_email' => $notify_email, @@ -260,7 +262,7 @@ $theme =& $this->Application->recallObject('theme.current'); /* @var $theme kDBItem */ - $template = kUtil::unhtmlentities( $this->Application->GetVar('success_template') ); // kHTTPQuery do htmlspecialchars on everything + $template = kUtil::unhtmlentities($this->Application->GetVar('success_template')); // kHTTPQuery do htmlspecialchars on everything $alias_template = $theme->GetField('TemplateAliases', $template); $event->redirect = $alias_template ? $alias_template : $template; @@ -273,7 +275,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(&$event) + protected function OnBeforeItemCreate(kEvent &$event) { parent::OnBeforeItemCreate($event); @@ -314,7 +316,7 @@ * @return void * @access protected */ - protected function OnBeforeItemUpdate(&$event) + protected function OnBeforeItemUpdate(kEvent &$event) { parent::OnBeforeItemUpdate($event); @@ -328,12 +330,14 @@ * Passes form_id, when using "Prev"/"Next" toolbar buttons * * @param kEvent $event + * @return void + * @access protected */ - function OnPreSaveAndGo(&$event) + protected function OnPreSaveAndGo(kEvent &$event) { parent::OnPreSaveAndGo($event); - if ($event->status == kEvent::erSUCCESS) { + if ( $event->status == kEvent::erSUCCESS ) { $event->SetRedirectParam('pass', 'm,form,formsubs'); } } @@ -343,12 +347,14 @@ * to passed tabs, by redirecting to it with OnPreSave event * * @param kEvent $event + * @return void + * @access protected */ - function OnPreSaveAndGoToTab(&$event) + protected function OnPreSaveAndGoToTab(kEvent &$event) { parent::OnPreSaveAndGoToTab($event); - if ($event->status == kEvent::erSUCCESS) { + if ( $event->status == kEvent::erSUCCESS ) { $event->SetRedirectParam('pass', 'm,form,formsubs'); } } @@ -388,7 +394,7 @@ * @return void * @access protected */ - protected function OnAfterItemLoad(&$event) + protected function OnAfterItemLoad(kEvent &$event) { parent::OnAfterItemLoad($event);