From: Donald A. Lobo Date: Thu, 7 Mar 2013 20:43:52 +0000 (-0800) Subject: fix CRM-12051 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a751618173ad44b97dd6222ea4aa4214c42cb995;p=civicrm-core.git fix CRM-12051 --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 6e4fef7a41..689a180d66 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1590,11 +1590,16 @@ class CRM_Contact_BAO_Query { } // check for both id and contact_id if ($this->_params[$id][0] == 'id' || $this->_params[$id][0] == 'contact_id') { - if ($this->_params[$id][1] == 'IS NULL' || + if ( + $this->_params[$id][1] == 'IS NULL' || $this->_params[$id][1] == 'IS NOT NULL' ) { $this->_where[0][] = "contact_a.id {$this->_params[$id][1]}"; } + elseif (is_array($this->_params[$id][2])) { + $idList = implode("','", $this->_params[$id][2]); + $this->_where[0][] = "contact_a.id IN ({$idList})"; + } else { $this->_where[0][] = "contact_a.id {$this->_params[$id][1]} {$this->_params[$id][2]}"; }