From a87fbfbdb909d06d8ed6ab267af36cb5d098a74e Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 19 May 2022 20:42:35 +1200 Subject: [PATCH] [Import] Remove svn whimsy - DUPLICATE_REPLACE --- CRM/Contact/Import/Form/Summary.php | 3 --- CRM/Contact/Import/Parser/Contact.php | 5 ----- CRM/Import/Parser.php | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CRM/Contact/Import/Form/Summary.php b/CRM/Contact/Import/Form/Summary.php index 8edea24325..d4a4655af7 100644 --- a/CRM/Contact/Import/Form/Summary.php +++ b/CRM/Contact/Import/Form/Summary.php @@ -35,9 +35,6 @@ class CRM_Contact_Import_Form_Summary extends CRM_Import_Form_Summary { if ($onDuplicate == CRM_Import_Parser::DUPLICATE_UPDATE) { $this->assign('dupeActionString', ts('These records have been updated with the imported data.')); } - elseif ($onDuplicate == CRM_Import_Parser::DUPLICATE_REPLACE) { - $this->assign('dupeActionString', ts('These records have been replaced with the imported data.')); - } elseif ($onDuplicate == CRM_Import_Parser::DUPLICATE_FILL) { $this->assign('dupeActionString', ts('These records have been filled in with the imported data.')); } diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index cae7b3a311..0b924b296c 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1944,11 +1944,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { $cid = NULL; $vals = ['contact_id' => $contactId]; - - if ($onDuplicate == CRM_Import_Parser::DUPLICATE_REPLACE) { - civicrm_api('contact', 'delete', $vals); - $cid = CRM_Contact_BAO_Contact::createProfileContact($formatted, $contactFields, $contactId, NULL, NULL, $formatted['contact_type']); - } if (in_array((int) $onDuplicate, [CRM_Import_Parser::DUPLICATE_UPDATE, CRM_Import_Parser::DUPLICATE_FILL], TRUE)) { $newContact = $this->createContact($formatted, $contactFields, $onDuplicate, $contactId); } diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 083a0140ed..5ccaf9858b 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -35,7 +35,7 @@ abstract class CRM_Import_Parser { /** * Codes for duplicate record handling */ - const DUPLICATE_SKIP = 1, DUPLICATE_REPLACE = 2, DUPLICATE_UPDATE = 4, DUPLICATE_FILL = 8, DUPLICATE_NOCHECK = 16; + const DUPLICATE_SKIP = 1, DUPLICATE_UPDATE = 4, DUPLICATE_FILL = 8, DUPLICATE_NOCHECK = 16; /** * Contact types -- 2.25.1