CRM-13955 revert NULL value change; condition parent job accordingly
authorBrian Shaughnessy <brian@lcdservices.biz>
Wed, 11 Dec 2013 20:01:32 +0000 (15:01 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Wed, 11 Dec 2013 20:01:32 +0000 (15:01 -0500)
CRM/Mailing/BAO/Mailing.php
CRM/Mailing/Form/Approve.php
CRM/Mailing/Form/Schedule.php

index 10c2bbc5487c3977e68b0a39c04efe6574aa90c6..bb74563a7e1d68693003cf84d7d7f37e989062e4 100644 (file)
@@ -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';
index 416994005cdc2bc8e373092c5266ed0af536a703..959531100bd01f0ee3e9bfeffa22500351afd4ce 100644 (file)
@@ -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();
index 5c0cbf96cb6d30773dcdb3f687556529489ce0e6..8b67e50350fe2dbd983d14e55eb406fa173c0dcd 100644 (file)
@@ -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 */