CRM-16922 fix - Broken smart groups due to CRM-16858
authormonishdeb <monish.deb@webaccessglobal.com>
Tue, 28 Jul 2015 07:14:23 +0000 (12:44 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Tue, 28 Jul 2015 07:32:23 +0000 (13:02 +0530)
https://issues.civicrm.org/jira/browse/CRM-16922

CRM/Contact/BAO/Query.php

index 58f7414c204e7ee83a5893338e42cbc4e9a84506..8a055eabc66f01b57787939dabce02b230da1e60 100644 (file)
@@ -2918,6 +2918,9 @@ class CRM_Contact_BAO_Query {
     elseif (strpos($op, 'IN') !== FALSE) {
       $groups = array($op => $groups);
     }
+    elseif (is_array($groups) && count($groups)) {
+      $groups = array('IN' => $groups);
+    }
 
     // Find all the groups that are part of a saved search.
     $smartGroupClause = self::buildClause("id", $op, $groups, 'Int');