From 86d079a21ee06759ac61efa414272d259ba6012f Mon Sep 17 00:00:00 2001 From: Eli Lisseck Date: Tue, 13 Jun 2017 15:30:16 -0400 Subject: [PATCH] CRM-20672 restrict field search to basic contact types re @seanmadsen 's review --- CRM/Core/BAO/Mapping.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 7dcced6e42..3051ad8169 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -604,7 +604,8 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { } //CRM-20672 If contact target type not set e.g. "All Contacts" relationship - present user with all field options and let them determine what they expect to work else { - foreach ($contactTypes as $contactType => $label) { + $types = CRM_Contact_BAO_ContactType::basicTypes(FALSE); + foreach ($types as $contactType => $label) { $relatedFields = array_merge($relatedFields, (array) $relatedMapperFields[$label]); } $relatedFields = array_merge($relatedFields, (array) $relationshipCustomFields); -- 2.25.1