[Ref] [Import][Member] Remove unused params
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 10 May 2022 23:38:51 +0000 (11:38 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 10 May 2022 23:38:51 +0000 (11:38 +1200)
CRM/Member/Import/Form/MapField.php

index 63272188b37dfe12f16ab0fee3946ea8465016ff..a901b1901b2d8584786a8f4f3da98c91916dbab7 100644 (file)
@@ -393,30 +393,13 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField {
     }
     $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);
@@ -468,7 +451,7 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField {
       $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')