----------------------------------------
* CRM-12376: CiviMail job with no remaining deliveries gets stuck in Running
http://issues.civicrm.org/jira/browse/CRM-12376
CRM_Core_Smarty::registerStringResource();
}
- $isDelivered = FALSE;
+ // CRM-12376
+ // This handles the edge case scenario where all the mails
+ // have been delivered in prior jobs
+ $isDelivered = TRUE;
// make sure that there's no more than $config->mailerBatchLimit mails processed in a run
while ($eq->fetch()) {
// CRM_Utils_System::xMemory( "$mailsProcessed: " );
// }
- if ($config->mailerBatchLimit > 0 &&
+ if (
+ $config->mailerBatchLimit > 0 &&
$mailsProcessed >= $config->mailerBatchLimit
) {
if (!empty($fields)) {