From d63bd1415f136a9708a6938aba862f94659ed175 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 15 Nov 2013 09:33:25 -0800 Subject: [PATCH] CRM-13766 - dont reset scheduled_date, use create function to reset approval fields ---------------------------------------- * CRM-13766: civimail with workflow broken: scheduled date not stored with mailing job http://issues.civicrm.org/jira/browse/CRM-13766 --- CRM/Mailing/Form/Schedule.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/CRM/Mailing/Form/Schedule.php b/CRM/Mailing/Form/Schedule.php index 33617775e2..8b67e50350 100644 --- a/CRM/Mailing/Form/Schedule.php +++ b/CRM/Mailing/Form/Schedule.php @@ -282,9 +282,9 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form { } $session = CRM_Core_Session::singleton(); + // set the scheduled_id $params['scheduled_id'] = $session->get('userID'); - $params['scheduled_date'] = date('YmdHis'); // set approval details if workflow is not enabled if (!CRM_Mailing_Info::workflowEnabled()) { @@ -294,13 +294,9 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form { } else { // reset them in case this mailing was rejected - $mailing = new CRM_Mailing_BAO_Mailing(); - $mailing->id = $ids['mailing_id']; - $mailing->find(TRUE); - - $mailing->approver_id = 'null'; - $mailing->approval_date = 'null'; - $mailing->approval_status_id = 'null'; + $params['approver_id'] = 'null'; + $params['approval_date'] = 'null'; + $params['approval_status_id'] = 'null'; } /* Build the mailing object */ -- 2.25.1