From e2b0fbec1c97093bee166431728b868e8cf9f32d Mon Sep 17 00:00:00 2001 From: monishdeb Date: Fri, 31 Jul 2015 23:29:17 +0530 Subject: [PATCH] CustomValue fix for Grant --- CRM/Contact/BAO/Query.php | 6 ++++++ CRM/Mailing/Form/Search.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 8a8663d50a..a785c2e5f6 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -5175,6 +5175,12 @@ SELECT COUNT( conts.total_amount ) as cancel_count, $clause = " (NULLIF($field, '') IS NOT NULL) "; return $clause; + case 'IN': + case 'NOT IN': + if (!empty($value) && is_array($value) && !array_key_exists($op, $value)) { + $value = array($op => $value); + } + default: if (empty($dataType)) { $dataType = 'String'; diff --git a/CRM/Mailing/Form/Search.php b/CRM/Mailing/Form/Search.php index 5d1f4b0708..86ad3dabc8 100644 --- a/CRM/Mailing/Form/Search.php +++ b/CRM/Mailing/Form/Search.php @@ -106,6 +106,8 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { public function postProcess() { $params = $this->controller->exportValues($this->_name); + CRM_Core_BAO_CustomValue::fixCustomFieldValue($this->_formValues); + CRM_Contact_BAO_Query::fixDateValues($params["mailing_relative"], $params['mailing_from'], $params['mailing_to']); $parent = $this->controller->getParent(); -- 2.25.1