CRM-20672 restrict field search to basic contact types re @seanmadsen 's review
authorEli Lisseck <elisseck@nesea.org>
Tue, 13 Jun 2017 19:30:16 +0000 (15:30 -0400)
committerEli Lisseck <elisseck@nesea.org>
Tue, 13 Jun 2017 19:30:16 +0000 (15:30 -0400)
CRM/Core/BAO/Mapping.php

index 7dcced6e42ba34101096fd45f7c4ef0d6bc10d65..3051ad8169e6dca7cfcc64c006886a9abd640e5c 100644 (file)
@@ -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);