Skip to content

Commit

Permalink
Merge pull request #23425 from eileenmcnaughton/import_member
Browse files Browse the repository at this point in the history
[Ref] [Import][Member] Remove unused params
  • Loading branch information
eileenmcnaughton authored May 11, 2022
2 parents a29aaa9 + 8bbb06d commit 81d84b2
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions CRM/Member/Import/Form/MapField.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,30 +393,13 @@ public function postProcess() {
}
$this->updateUserJobMetadata('submitted_values', $this->getSubmittedValues());

$mapperKeys = [];
$mapper = [];
$mapperKeys = $this->controller->exportValue($this->_name, 'mapper');
$mapperKeysMain = [];
$mapperLocType = [];
$mapperPhoneType = [];

for ($i = 0; $i < $this->_columnCount; $i++) {
$mapper[$i] = $this->_mapperFields[$mapperKeys[$i][0]];
$mapperKeysMain[$i] = $mapperKeys[$i][0];

if (!empty($mapperKeys[$i][1]) && is_numeric($mapperKeys[$i][1])) {
$mapperLocType[$i] = $mapperKeys[$i][1];
}
else {
$mapperLocType[$i] = NULL;
}

if (!empty($mapperKeys[$i][2]) && (!is_numeric($mapperKeys[$i][2]))) {
$mapperPhoneType[$i] = $mapperKeys[$i][2];
}
else {
$mapperPhoneType[$i] = NULL;
}
}

$this->set('mapper', $mapper);
Expand Down Expand Up @@ -468,7 +451,7 @@ public function postProcess() {
$this->set('savedMapping', $saveMappingFields->mapping_id);
}

$parser = new CRM_Member_Import_Parser_Membership($mapperKeysMain, $mapperLocType, $mapperPhoneType);
$parser = new CRM_Member_Import_Parser_Membership($mapperKeysMain);
$parser->setUserJobID($this->getUserJobID());
$parser->run($this->getSubmittedValue('uploadFile'), $this->getSubmittedValue('fieldSeparator'), $mapper, $this->getSubmittedValue('skipColumnHeader'),
CRM_Import_Parser::MODE_PREVIEW, $this->get('contactType')
Expand Down

0 comments on commit 81d84b2

Please sign in to comment.