From 1de4945d269061b79a9b8831c83424e1ae352b0a Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Sun, 27 Sep 2015 15:03:49 -0400 Subject: [PATCH] CRM-17269 - Simplify retrieval of relationship types for query, and support relationship types on contact subtypes properly. ---------------------------------------- * CRM-17269: advanced search with custom relationship types fails https://issues.civicrm.org/jira/browse/CRM-17269 --- CRM/Contact/BAO/Query.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 54873b5b87..4fd8411b77 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3966,12 +3966,7 @@ WHERE $smartGroupClause } } - $relTypeInd = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, 'null', NULL, 'Individual'); - $relTypeOrg = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, 'null', NULL, 'Organization'); - $relTypeHou = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, 'null', NULL, 'Household'); - $allRelationshipType = array(); - $allRelationshipType = array_merge($relTypeInd, $relTypeOrg); - $allRelationshipType = array_merge($allRelationshipType, $relTypeHou); + $allRelationshipType = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, 'null', NULL, NULL, TRUE); if ($nameClause || !$targetGroup) { if (!empty($relationType)) { -- 2.25.1