[REF] [Import] Stop passing unused param
authorEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 6 May 2022 04:34:45 +0000 (16:34 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Fri, 6 May 2022 04:43:50 +0000 (16:43 +1200)
CRM/Contact/Import/Form/DataSource.php
CRM/Contact/Import/Form/MapField.php
CRM/Contact/Import/ImportJob.php
CRM/Contact/Import/Parser/Contact.php

index 6ba0d22a3942a71e2869e75a3b266c9d326ee189..12e27b0a7281349201b725699f77d07e87ae3e3a 100644 (file)
@@ -217,17 +217,9 @@ class CRM_Contact_Import_Form_DataSource extends CRM_Import_Forms {
     $parser = new CRM_Contact_Import_Parser_Contact($mapper);
     $parser->setMaxLinesToProcess(100);
     $parser->setUserJobID($this->getUserJobID());
-    $parser->run(NULL,
+    $parser->run(
       [],
-      CRM_Import_Parser::MODE_MAPFIELD,
-      $this->getSubmittedValue('contactType'),
-      '_id',
-      '_status',
-      CRM_Import_Parser::DUPLICATE_SKIP,
-      NULL, NULL, FALSE,
-      CRM_Contact_Import_Parser_Contact::DEFAULT_TIMEOUT,
-      $this->getSubmittedValue('contactSubType'),
-      $this->getSubmittedValue('dedupe_rule_id')
+      CRM_Import_Parser::MODE_MAPFIELD
     );
 
     // add all the necessary variables to the form
index 7a1d38498fd8e263e2da5979846fe7259895d5c3..4468257fef4a6421adeee1d5c64afdf85b81c83f 100644 (file)
@@ -554,15 +554,7 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField {
 
     $parser->run(NULL,
       $mapper,
-      CRM_Import_Parser::MODE_PREVIEW,
-      NULL,
-      '_id',
-      '_status',
-      (int) $this->getSubmittedValue('onDuplicate'),
-      NULL, NULL, FALSE,
-      CRM_Contact_Import_Parser_Contact::DEFAULT_TIMEOUT,
-      $this->getSubmittedValue('contactSubType'),
-      $this->getSubmittedValue('dedupe_rule_id')
+      CRM_Import_Parser::MODE_PREVIEW
     );
     return $parser;
   }
index f9f3c49cc9728c2d4b0ba94215231322f05806fd..34b6dae7e79cb6594db75a2abad3347d6689d868 100644 (file)
@@ -178,18 +178,11 @@ class CRM_Contact_Import_ImportJob {
       $parserParameters['relatedContactWebsiteType']
     );
     $this->_parser->setUserJobID($this->_userJobID);
-    $this->_parser->run(NULL, $mapperFields,
+    $this->_parser->run(
+      $mapperFields,
       CRM_Import_Parser::MODE_IMPORT,
-      $this->_contactType,
-      $this->_primaryKeyName,
-      $this->_statusFieldName,
-      $this->_onDuplicate,
       $this->_statusID,
-      $this->_totalRowCount,
-      $this->_doGeocodeAddress,
-      CRM_Contact_Import_Parser_Contact::DEFAULT_TIMEOUT,
-      $this->_contactSubType,
-      $this->_dedupe
+      $this->_totalRowCount
     );
 
     $contactIds = $this->_parser->getImportedContacts();
index f670fa1e6292488ce6d014dbdff46e5ce69908a8..6c48f7524504f3f776bb2a9d6a2cfd7a496008e7 100644 (file)
@@ -2435,27 +2435,17 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
   /**
    * Run import.
    *
-   * @param string $tableName
    * @param array $mapper
    * @param int $mode
-   * @param int $contactType
-   * @param string $primaryKeyName
-   * @param string $statusFieldName
-   * @param int $onDuplicate
    * @param int $statusID
    * @param int $totalRowCount
    *
    * @return mixed
-   * @throws \API_Exception
+   * @throws \API_Exception|\CRM_Core_Exception
    */
   public function run(
-    $tableName,
     $mapper = [],
     $mode = self::MODE_PREVIEW,
-    $contactType = self::CONTACT_INDIVIDUAL,
-    $primaryKeyName = '_id',
-    $statusFieldName = '_status',
-    $onDuplicate = self::DUPLICATE_SKIP,
     $statusID = NULL,
     $totalRowCount = NULL
   ) {