CRM-17398: Enotice on participant delete
authoryashodha <yashodha.chaku@webaccessglobal.com>
Tue, 22 Dec 2015 07:14:16 +0000 (12:44 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Tue, 22 Dec 2015 07:14:16 +0000 (12:44 +0530)
----------------------------------------
* CRM-17398: Enotice on participant delete
  https://issues.civicrm.org/jira/browse/CRM-17398

CRM/Event/BAO/Query.php

index f2f0d16f1bd3f9f6a9b7919530fcee55c769edd1..f5d3d2bca43f104b89ae02a36c44c957a728755a 100644 (file)
@@ -379,7 +379,10 @@ class CRM_Event_BAO_Query {
 
         $dataType = !empty($fields[$qillName]['type']) ? CRM_Utils_Type::typeToString($fields[$qillName]['type']) : 'String';
         $tableName = empty($tableName) ? 'civicrm_participant' : $tableName;
-
+        if (is_array($value) && in_array(key($value), CRM_Core_DAO::acceptedSQLOperators(), TRUE)) {
+          $op = key($value);
+          $value = $value[$op];
+        }
         $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("$tableName.$name", $op, $value, $dataType);
 
         list($op, $value) = CRM_Contact_BAO_Query::buildQillForFieldValue('CRM_Event_DAO_Participant', $name, $value, $op);