Merge pull request #23227 from eileenmcnaughton/inbetween_4
[civicrm-core.git] / CRM / Custom / Import / Parser.php
index 68036ecb96113785f1f5c1cc8302494cf621699d..084937081f37a75786ef2525e7e9bb376946620e 100644 (file)
@@ -59,7 +59,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Import_Parser {
   public function run(
     $fileName,
     $separator,
-    &$mapper,
+    $mapper,
     $skipColumnHeader = FALSE,
     $mode = self::MODE_PREVIEW,
     $contactType = self::CONTACT_INDIVIDUAL,
@@ -192,10 +192,6 @@ abstract class CRM_Custom_Import_Parser extends CRM_Import_Parser {
       }
 
       if ($returnCode & self::DUPLICATE) {
-        if ($returnCode & self::MULTIPLE_DUPE) {
-          /* TODO: multi-dupes should be counted apart from singles
-           * on non-skip action */
-        }
         $this->_duplicateCount++;
         $recordNumber = $this->_lineCount;
         if ($this->_haveColumnHeader) {
@@ -238,7 +234,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Import_Parser {
           ts('Reason'),
         ], $customHeaders);
         $this->_errorFileName = self::errorFileName(self::ERROR);
-        CRM_Contact_Import_Parser::exportCSV($this->_errorFileName, $headers, $this->_errors);
+        CRM_Contact_Import_Parser_Contact::exportCSV($this->_errorFileName, $headers, $this->_errors);
       }
       if ($this->_conflictCount) {
         $headers = array_merge([
@@ -246,7 +242,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Import_Parser {
           ts('Reason'),
         ], $customHeaders);
         $this->_conflictFileName = self::errorFileName(self::CONFLICT);
-        CRM_Contact_Import_Parser::exportCSV($this->_conflictFileName, $headers, $this->_conflicts);
+        CRM_Contact_Import_Parser_Contact::exportCSV($this->_conflictFileName, $headers, $this->_conflicts);
       }
       if ($this->_duplicateCount) {
         $headers = array_merge([
@@ -255,7 +251,7 @@ abstract class CRM_Custom_Import_Parser extends CRM_Import_Parser {
         ], $customHeaders);
 
         $this->_duplicateFileName = self::errorFileName(self::DUPLICATE);
-        CRM_Contact_Import_Parser::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
+        CRM_Contact_Import_Parser_Contact::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
       }
     }
     return $this->fini();