Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/mailing_lists/mailing_list_tp.php
Show All 12 Lines | |||||
*/ | */ | ||||
defined('FULL_PATH') or die('restricted access!'); | defined('FULL_PATH') or die('restricted access!'); | ||||
class MailingListTagProcessor extends kDBTagProcessor { | class MailingListTagProcessor extends kDBTagProcessor { | ||||
function PrintRecipients($params) | function PrintRecipients($params) | ||||
{ | { | ||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBItem */ | |||||
/** @var MailingListHelper $mailing_list_helper */ | |||||
$mailing_list_helper = $this->Application->recallObject('MailingListHelper'); | $mailing_list_helper = $this->Application->recallObject('MailingListHelper'); | ||||
/* @var $mailing_list_helper MailingListHelper */ | |||||
// for each group convert ids to names | // for each group convert ids to names | ||||
$recipient_names = Array (); | $recipient_names = Array (); | ||||
$recipients_grouped = $mailing_list_helper->groupRecipientsByType(explode(';', $object->GetDBField('To'))); | $recipients_grouped = $mailing_list_helper->groupRecipientsByType(explode(';', $object->GetDBField('To'))); | ||||
foreach ($recipients_grouped as $recipient_type => $group_recipients) { | foreach ($recipients_grouped as $recipient_type => $group_recipients) { | ||||
$recipient_names = array_merge($recipient_names, $mailing_list_helper->getRecipientNames($recipient_type, $group_recipients)); | $recipient_names = array_merge($recipient_names, $mailing_list_helper->getRecipientNames($recipient_type, $group_recipients)); | ||||
} | } | ||||
Show All 16 Lines | |||||
function IsManualRecipient($params) | function IsManualRecipient($params) | ||||
{ | { | ||||
$external_call = $this->Application->GetVar('mailing_recipient_type'); | $external_call = $this->Application->GetVar('mailing_recipient_type'); | ||||
if ($external_call) { | if ($external_call) { | ||||
return false; | return false; | ||||
} | } | ||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBItem */ | |||||
return $object->IsNewItem(); | return $object->IsNewItem(); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |