Index: branches/5.3.x/core/units/mailing_lists/mailing_list_eh.php =================================================================== diff -u -N -r15677 -r15698 --- branches/5.3.x/core/units/mailing_lists/mailing_list_eh.php (.../mailing_list_eh.php) (revision 15677) +++ branches/5.3.x/core/units/mailing_lists/mailing_list_eh.php (.../mailing_list_eh.php) (revision 15698) @@ -1,6 +1,6 @@ getEventParam('ids'); if ( $ids ) { - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table_name = $this->Application->getUnitOption($event->Prefix, 'TableName'); + $config = $event->getUnitConfig(); + $id_field = $config->getIDField(); $sql = 'SELECT ' . $id_field . ' - FROM ' . $table_name . ' + FROM ' . $config->getTableName() . ' WHERE ' . $id_field . ' IN (' . implode(',', $ids) . ') AND Status <> ' . MailingList::PARTIALLY_PROCESSED; $allowed_ids = $this->Conn->GetCol($sql); @@ -249,7 +249,7 @@ $object = $event->getObject(); /* @var $object kDBItem */ - $sql = 'DELETE FROM ' . $this->Application->getUnitOption('email-queue', 'TableName') . ' + $sql = 'DELETE FROM ' . $this->Application->getUnitConfig('email-queue')->getTableName() . ' WHERE MailingId = ' . $object->GetID(); $this->Conn->Query($sql); } @@ -283,8 +283,9 @@ */ function OnGenerateEmailQueue($event) { - $id_field = $this->Application->getUnitOption($event->Prefix, 'IDField'); - $table_name = $this->Application->getUnitOption($event->Prefix, 'TableName'); + $config = $event->getUnitConfig(); + $id_field = $config->getIDField(); + $table_name = $config->getTableName(); $where_clause = Array ( 'Status NOT IN (' . MailingList::CANCELLED . ',' . MailingList::PROCESSED . ')', @@ -367,7 +368,7 @@ return ; } - $queue_table = $this->Application->getUnitOption('email-queue', 'TableName'); + $queue_table = $this->Application->getUnitConfig('email-queue')->getTableName(); // get queue part to send $sql = 'SELECT *