Skip to content

Commit

Permalink
[REF] [Import] Stop passing unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed May 6, 2022
1 parent 4143c82 commit c169525
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 40 deletions.
12 changes: 2 additions & 10 deletions CRM/Contact/Import/Form/DataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,9 @@ public function postProcess() {
$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
Expand Down
10 changes: 1 addition & 9 deletions CRM/Contact/Import/Form/MapField.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,7 @@ public function submit($params, $mapperKeys) {

$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;
}
Expand Down
13 changes: 3 additions & 10 deletions CRM/Contact/Import/ImportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,11 @@ public function runImport(&$form, $timeout = 55) {
$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();
Expand Down
12 changes: 1 addition & 11 deletions CRM/Contact/Import/Parser/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -2435,27 +2435,17 @@ public function deprecated_contact_check_params(
/**
* 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
) {
Expand Down

0 comments on commit c169525

Please sign in to comment.