Merge pull request #21316 from colemanw/afformGet
[civicrm-core.git] / CRM / Contact / Import / Parser / Contact.php
index 113248c951b6bf05313dd400e0a049df52bf40aa..bc5c30579728fbd7e01c41430fb7d213913679a7 100644 (file)
@@ -1068,7 +1068,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
           }
 
           // check for values for custom fields for checkboxes and multiselect
-          if ($isSerialized) {
+          if ($isSerialized && $dataType != 'ContactReference') {
             $value = trim($value);
             $value = str_replace('|', ',', $value);
             $mulValues = explode(',', $value);
@@ -1632,15 +1632,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
     $defaults = [];
     $contactObj = CRM_Contact_BAO_Contact::retrieve($contactParams, $defaults);
 
-    $modeUpdate = $modeFill = FALSE;
-
-    if ($onDuplicate == CRM_Import_Parser::DUPLICATE_UPDATE) {
-      $modeUpdate = TRUE;
-    }
-
-    if ($onDuplicate == CRM_Import_Parser::DUPLICATE_FILL) {
-      $modeFill = TRUE;
-    }
+    $modeFill = ($onDuplicate == CRM_Import_Parser::DUPLICATE_FILL);
 
     $groupTree = CRM_Core_BAO_CustomGroup::getTree($params['contact_type'], NULL, $cid, 0, NULL);
     CRM_Core_BAO_CustomGroup::setDefaults($groupTree, $defaults, FALSE, FALSE);