From: JKingsnorth Date: Wed, 15 Apr 2015 09:01:28 +0000 (+0100) Subject: CRM-16284: Add missing phone location condition X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8b3d5966034130e5cbda042b7f50dc080e51dd15;p=civicrm-core.git CRM-16284: Add missing phone location condition --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 6c33c85af5..8a96542ce6 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1165,6 +1165,9 @@ class CRM_Contact_BAO_Query { //gross hack to pickup corrupted data also, CRM-7603 if (strpos($cond, 'phone_type_id') !== FALSE) { $phoneTypeCondition = " AND ( `$tName`.$cond OR `$tName`.phone_type_id IS NULL ) "; + if (!empty($lCond)) { + $phoneTypeCondition .= " AND ( `$tName`.$lCond ) "; + } } $this->_tables[$tName] .= $phoneTypeCondition; }