From 25fbd1cbb8aa53cb7235afd2e37a14ccfd1ba5e1 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Wed, 30 Jul 2014 11:15:47 -0400 Subject: [PATCH] CRM-14912 support import matching with external ID --- CRM/Contact/Import/Parser/Contact.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 7175f9865b..3ac73d1399 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -535,30 +535,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { if ($cid) { $params['id'] = $cid; } - else { - //update contact if dedupe found contact id, CRM-4148 - $dedupeParams = $formatted; - - //special case to check dedupe if external id present. - //if we send external id dedupe will stop. - unset($dedupeParams['external_identifier']); - require_once 'CRM/Utils/DeprecatedUtils.php'; - $checkDedupe = _civicrm_api3_deprecated_duplicate_formatted_contact($dedupeParams); - if (CRM_Core_Error::isAPIError($checkDedupe, CRM_Core_ERROR::DUPLICATE_CONTACT)) { - $matchingContactIds = explode(',', $checkDedupe['error_message']['params'][0]); - if (count($matchingContactIds) == 1) { - $params['id'] = array_pop($matchingContactIds); - } - else { - $message = "More than one matching contact found for given criteria."; - array_unshift($values, $message); - $this->_retCode = CRM_Import_Parser::NO_MATCH; - } - } - else { - $createNewContact = TRUE; - } - } } $error = _civicrm_api3_deprecated_duplicate_formatted_contact($formatted); -- 2.25.1