From: eileen Date: Sun, 7 May 2017 03:09:56 +0000 (+1200) Subject: NFC remove some unused variables. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=925f8454e452b2f073c6d974670bae00f8815879;p=civicrm-core.git NFC remove some unused variables. The is never used and without it the others are not required either. This is probably copy & paste from other functions that has not been made to work, but I don't think leaving non-functional code there is a good step towards identifying & fixing whatever problem exists --- diff --git a/CRM/Contribute/Import/Form/MapField.php b/CRM/Contribute/Import/Form/MapField.php index eeb26f0bf7..8421712d4d 100644 --- a/CRM/Contribute/Import/Form/MapField.php +++ b/CRM/Contribute/Import/Form/MapField.php @@ -161,11 +161,9 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { $hasHeaders = !empty($this->_columnHeaders); $headerPatterns = $this->get('headerPatterns'); $dataPatterns = $this->get('dataPatterns'); - $hasLocationTypes = $this->get('fieldTypes'); $mapperKeysValues = $this->controller->exportValue($this->_name, 'mapper'); /* Initialize all field usages to false */ - foreach ($mapperKeys as $key) { $this->_fieldUsed[$key] = FALSE; } @@ -177,27 +175,6 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { unset($sel1['contribution_id']); } - // start of soft credit section - // get contact type for this import - $contactTypeId = $this->get('contactType'); - $contactTypes = array( - CRM_Import_Parser::CONTACT_INDIVIDUAL => 'Individual', - CRM_Import_Parser::CONTACT_HOUSEHOLD => 'Household', - CRM_Import_Parser::CONTACT_ORGANIZATION => 'Organization', - ); - - $contactType = isset($contactTypes[$contactTypeId]) ? $contactTypes[$contactTypeId] : ''; - - // get importable fields for contact type - $contactFields = CRM_Contact_BAO_Contact::importableFields($contactType, NULL); - - // get the Dedupe rule for this contact type and build soft credit array - $ruleParams = array( - 'contact_type' => $contactType, - 'used' => 'Unsupervised', - ); - $fieldsArray = CRM_Dedupe_BAO_Rule::dedupeRuleFields($ruleParams); - $softCreditFields['contact_id'] = ts('Contact ID'); $softCreditFields['external_identifier'] = ts('External ID'); $softCreditFields['email'] = ts('Email'); @@ -207,7 +184,6 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { $sel4 = NULL; // end of soft credit section - $js = "