Index: branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php =================================================================== diff -u -N -r14989 -r15065 --- branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php (.../mailing_list_eh.php) (revision 14989) +++ branches/5.2.x/core/units/mailing_lists/mailing_list_eh.php (.../mailing_list_eh.php) (revision 15065) @@ -1,6 +1,6 @@ Application->GetVar('mailing_recipient_type'); - if (!$recipient_type) { - return ; + if ( !$recipient_type ) { + return; } $recipients = $this->Application->GetVar($recipient_type); - if ($recipients) { + if ( $recipients ) { $object =& $event->getObject(); /* @var $object kDBItem */ @@ -69,11 +71,12 @@ * @return void * @access protected */ - protected function customProcessing(&$event, $type) + protected function customProcessing(kEvent &$event, $type) { - if ($event->Name == 'OnMassDelete' && $type == 'before') { + if ( $event->Name == 'OnMassDelete' && $type == 'before' ) { $ids = $event->getEventParam('ids'); - if ($ids) { + + if ( $ids ) { $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); $table_name = $this->Application->getUnitOption($event->Prefix, 'TableName'); @@ -88,11 +91,13 @@ } /** - * Delete all realted mails in email queue + * Delete all related mails in email queue * * @param kEvent $event + * @return void + * @access protected */ - function OnAfterItemDelete(&$event) + protected function OnAfterItemDelete(kEvent &$event) { parent::OnAfterItemDelete($event); @@ -103,11 +108,11 @@ // delete mailing attachments after mailing is deleted $attachments = $object->GetField('Attachments', 'file_paths'); - if ($attachments) { + if ( $attachments ) { $attachments = explode('|', $attachments); foreach ($attachments as $attachment_file) { - if (file_exists($attachment_file)) { + if ( file_exists($attachment_file) ) { unlink($attachment_file); } } @@ -144,7 +149,7 @@ * @return void * @access protected */ - protected function OnBeforeItemCreate(&$event) + protected function OnBeforeItemCreate(kEvent &$event) { parent::OnBeforeItemCreate($event); @@ -173,16 +178,18 @@ * Deletes mailing list email queue, when it becomes cancelled * * @param kEvent $event + * @return void + * @access protected */ - function OnAfterItemUpdate(&$event) + protected function OnAfterItemUpdate(kEvent &$event) { parent::OnAfterItemUpdate($event); $object =& $event->getObject(); /* @var $object kDBItem */ $status = $object->GetDBField('Status'); - if (($status != $object->GetOriginalField('Status')) && ($status == MailingList::CANCELLED)) { + if ( ($status != $object->GetOriginalField('Status')) && ($status == MailingList::CANCELLED) ) { $this->_deleteQueue($event); } }