From 9e3463570abe43f03efce83604346eb0225db19f Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Wed, 11 Dec 2013 15:01:32 -0500 Subject: [PATCH] CRM-13955 revert NULL value change; condition parent job accordingly --- CRM/Mailing/BAO/Mailing.php | 2 +- CRM/Mailing/Form/Approve.php | 4 ++-- CRM/Mailing/Form/Schedule.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) 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 */ -- 2.25.1