From c0d307ec06c8564d03b59fa6504c560e4d2ce597 Mon Sep 17 00:00:00 2001 From: kurund Date: Thu, 29 Aug 2013 19:13:26 +0530 Subject: [PATCH] CRM-13066, code cleanup ---------------------------------------- * CRM-13066: 'Clean up Caches' deletes in progress batches http://issues.civicrm.org/jira/browse/CRM-13066 --- CRM/Batch/Form/Entry.php | 2 +- CRM/Batch/Page/AJAX.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index b4f672778e..c39d37a22b 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -340,6 +340,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { // get the cached info from data column of civicrm_batch $data = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', $this->_batchId, 'data'); $defaults = json_decode($data, TRUE); + $defaults = $defaults['values']; } return $defaults; @@ -371,7 +372,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { // close status 'status_id' => 2, 'total' => $params['actualBatchTotal'], - 'data' => 'NULL', ); CRM_Batch_BAO_Batch::create($paramValues); diff --git a/CRM/Batch/Page/AJAX.php b/CRM/Batch/Page/AJAX.php index f3f6bff75c..810c41e124 100644 --- a/CRM/Batch/Page/AJAX.php +++ b/CRM/Batch/Page/AJAX.php @@ -46,7 +46,7 @@ class CRM_Batch_Page_AJAX { $batchId = CRM_Utils_Type::escape($_POST['batch_id'], 'Positive'); unset($_POST['qfKey']); - CRM_Core_DAO::setFieldValue('CRM_Batch_DAO_Batch', $batchId, 'data', json_encode($_POST)); + CRM_Core_DAO::setFieldValue('CRM_Batch_DAO_Batch', $batchId, 'data', json_encode(array('values' => $_POST))); CRM_Utils_System::civiExit(); } -- 2.25.1