CustomValue fix for Grant
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 31 Jul 2015 17:59:17 +0000 (23:29 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 31 Jul 2015 17:59:17 +0000 (23:29 +0530)
CRM/Contact/BAO/Query.php
CRM/Mailing/Form/Search.php

index 8a8663d50a987ab9d68ae099d8b5b4f7cae31e22..a785c2e5f65c2cadaab27c4818f471a69b974917 100644 (file)
@@ -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';
index 5d1f4b0708da1a136aaed65a12efa7f635b4b230..86ad3dabc83ef59aa37c3df610438318e7c3a1e4 100644 (file)
@@ -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();