Minor simplification - use
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 7 Jun 2022 10:00:51 +0000 (22:00 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 7 Jun 2022 10:00:51 +0000 (22:00 +1200)
CRM/Contribute/Import/Form/MapField.php

index 60c8cc3e41c7ad082d3782330e28ed2b8514adb1..8c7c0b3156d1454c62d8ca69aec64c2a10e258d9 100644 (file)
@@ -316,15 +316,9 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField {
         $importKeys[] = $mapperPart[0];
       }
 
-      $contactTypeId = $self->get('contactType');
-      $contactTypes = [
-        CRM_Import_Parser::CONTACT_INDIVIDUAL => 'Individual',
-        CRM_Import_Parser::CONTACT_HOUSEHOLD => 'Household',
-        CRM_Import_Parser::CONTACT_ORGANIZATION => 'Organization',
-      ];
       $params = [
         'used' => 'Unsupervised',
-        'contact_type' => $contactTypes[$contactTypeId] ?? '',
+        'contact_type' => $self->getContactType(),
       ];
       [$ruleFields, $threshold] = CRM_Dedupe_BAO_DedupeRuleGroup::dedupeRuleFieldsWeight($params);
       $weightSum = 0;