From: monishdeb Date: Fri, 31 Jul 2015 17:59:17 +0000 (+0530) Subject: CustomValue fix for Grant X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e2b0fbec1c97093bee166431728b868e8cf9f32d;p=civicrm-core.git CustomValue fix for Grant --- 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();