class EmailMessagesEventHandler extends kDBEventHandler
{
/**
* Replace id passed with id of email message
*
* @param kEvent $event
*/
function getPassedID(&$event)
{
+ $event->setEventParam('raise_warnings', 0);
+
$parent = parent::getPassedID($event);
- if ($parent) return $parent;
+ if ($parent) {
+ return $parent;
+ }
$email_event_id = (int)$this->getEmailEventId();
$object =& $event->getObject();
$parent_info = $object->getLinkedInfo();
- $sql = 'SELECT '.$object->IDField.' FROM '.$object->TableName.' WHERE ('.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'].') AND (EventId = '.$email_event_id.')';
+ $sql = 'SELECT '.$object->IDField.'
+ FROM '.$object->TableName.'
+ WHERE ('.$parent_info['ForeignKey'].' = '.$parent_info['ParentId'].') AND (EventId = '.$email_event_id.')';