Changeset View
Changeset View
Standalone View
Standalone View
branches/5.3.x/core/units/helpers/mailing_list_helper.php
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Line(s) | |||||
SET Status = ' . MailingList::PROCESSED . ' | SET Status = ' . MailingList::PROCESSED . ' | ||||
WHERE (Status = ' . MailingList::PARTIALLY_PROCESSED . ') AND (EmailsSent = EmailsTotal)'; | WHERE (Status = ' . MailingList::PARTIALLY_PROCESSED . ') AND (EmailsSent = EmailsTotal)'; | ||||
$this->Conn->Query($sql); | $this->Conn->Query($sql); | ||||
} | } | ||||
/** | /** | ||||
* Sent given messages from email queue. | * Sent given messages from email queue. | ||||
* | * | ||||
* @param array|null $messages Messages. | |||||
* | |||||
* @return integer | * @return integer | ||||
*/ | */ | ||||
function processQueue() | function processQueue(&$messages = null) | ||||
{ | { | ||||
/** @var kEmailSendingHelper $esender */ | /** @var kEmailSendingHelper $esender */ | ||||
$esender = $this->Application->recallObject('EmailSender'); | $esender = $this->Application->recallObject('EmailSender'); | ||||
if ( !isset($messages) ) { | |||||
$messages = $this->getMessages(); | $messages = $this->getMessages(); | ||||
} | |||||
else { | |||||
kUtil::deprecatedArgument(__METHOD__, '5.3.0-B1', 'The "$messages" parameter is deprecated.'); | |||||
} | |||||
$message_count = count($messages); | $message_count = count($messages); | ||||
if ( !$message_count ) { | if ( !$message_count ) { | ||||
return 0; | return 0; | ||||
} | } | ||||
$i = 0; | $i = 0; | ||||
$message = Array(); | $message = Array(); | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
if ( !$value ) { | if ( !$value ) { | ||||
// configuration variable found, but it's value is empty or zero | // configuration variable found, but it's value is empty or zero | ||||
return false; | return false; | ||||
} | } | ||||
return $value; | return $value; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |