From 1a4443b0a2569a1f437bc4252df32939cb207d7d Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 2 Jun 2022 19:08:08 +1200 Subject: [PATCH] Remove now-unused getActiveFields --- CRM/Contact/Import/Parser/Contact.php | 33 +-------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index e53305fabd..00b74465f8 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -37,7 +37,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { * * @var array */ - protected $_newContacts; + protected $_newContacts = []; /** * Line count id. @@ -88,16 +88,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { */ public $_dedupeRuleGroupID = NULL; - /** - * Class constructor. - * - * @param array $mapperKeys - */ - public function __construct($mapperKeys = []) { - parent::__construct(); - $this->_mapperKeys = $mapperKeys; - } - /** * The initializer code, called before processing. */ @@ -106,9 +96,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { foreach ($this->getImportableFieldsMetadata() as $name => $field) { $this->addField($name, $field['title'], CRM_Utils_Array::value('type', $field), CRM_Utils_Array::value('headerPattern', $field), CRM_Utils_Array::value('dataPattern', $field), CRM_Utils_Array::value('hasLocationType', $field)); } - $this->_newContacts = []; - - $this->setActiveFields($this->_mapperKeys); $this->_parseStreetAddress = CRM_Utils_Array::value('street_address_parsing', CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_options'), FALSE); } @@ -1297,24 +1284,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { } } - /** - * Given a list of the importable field keys that the user has selected. - * set the active fields array to this list - * - * @param array $fieldKeys - * Mapped array of values. - */ - public function setActiveFields($fieldKeys) { - foreach ($fieldKeys as $key) { - if (empty($this->_fields[$key])) { - $this->_activeFields[] = new CRM_Contact_Import_Field('', ts('- do not import -')); - } - else { - $this->_activeFields[] = clone($this->_fields[$key]); - } - } - } - /** * @param string $name * @param $title -- 2.25.1