From: Brian Shaughnessy Date: Wed, 11 Dec 2013 20:01:32 +0000 (-0500) Subject: CRM-13955 revert NULL value change; condition parent job accordingly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9e3463570abe43f03efce83604346eb0225db19f;p=civicrm-core.git CRM-13955 revert NULL value change; condition parent job accordingly --- diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 10c2bbc548..bb74563a7e 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -1600,7 +1600,7 @@ ORDER BY civicrm_email.is_bulkmail DESC * create parent job if not yet created * condition on the existence of a scheduled date */ - if (!empty($params['scheduled_date'])) { + if (!empty($params['scheduled_date']) && $params['scheduled_date'] != 'null') { $job = new CRM_Mailing_BAO_MailingJob(); $job->mailing_id = $mailing->id; $job->status = 'Scheduled'; diff --git a/CRM/Mailing/Form/Approve.php b/CRM/Mailing/Form/Approve.php index 416994005c..959531100b 100644 --- a/CRM/Mailing/Form/Approve.php +++ b/CRM/Mailing/Form/Approve.php @@ -188,8 +188,8 @@ class CRM_Mailing_Form_Approve extends CRM_Core_Form { if ($rejectOptionID && $params['approval_status_id'] == $rejectOptionID ) { - $params['scheduled_id'] = NULL; - $params['scheduled_date'] = NULL; + $params['scheduled_id'] = 'null'; + $params['scheduled_date'] = 'null'; // also delete any jobs associated with this mailing $job = new CRM_Mailing_BAO_MailingJob(); diff --git a/CRM/Mailing/Form/Schedule.php b/CRM/Mailing/Form/Schedule.php index 5c0cbf96cb..8b67e50350 100644 --- a/CRM/Mailing/Form/Schedule.php +++ b/CRM/Mailing/Form/Schedule.php @@ -294,9 +294,9 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form { } else { // reset them in case this mailing was rejected - $params['approver_id'] = NULL; - $params['approval_date'] = NULL; - $params['approval_status_id'] = NULL; + $params['approver_id'] = 'null'; + $params['approval_date'] = 'null'; + $params['approval_status_id'] = 'null'; } /* Build the mailing object */