From 063338e5a64dee80506fbd1b6ddf7a93884d1695 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 21 Sep 2016 18:55:58 +0530 Subject: [PATCH] Fix for other entities --- CRM/Activity/Import/Form/MapField.php | 4 +--- CRM/Activity/Import/Form/Preview.php | 4 +--- CRM/Contribute/Import/Form/MapField.php | 4 +--- CRM/Contribute/Import/Form/Preview.php | 4 +--- CRM/Custom/Import/Form/MapField.php | 4 +--- CRM/Custom/Import/Form/Preview.php | 4 +--- CRM/Event/Import/Form/MapField.php | 11 ++--------- CRM/Event/Import/Form/Preview.php | 11 ++--------- CRM/Member/Import/Form/MapField.php | 4 +--- CRM/Member/Import/Form/Preview.php | 4 +--- 10 files changed, 12 insertions(+), 42 deletions(-) diff --git a/CRM/Activity/Import/Form/MapField.php b/CRM/Activity/Import/Form/MapField.php index baec4b1f68..324ce8b8c8 100644 --- a/CRM/Activity/Import/Form/MapField.php +++ b/CRM/Activity/Import/Form/MapField.php @@ -376,11 +376,9 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { } $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapperKeys = array(); $mapper = array(); $mapperKeys = $this->controller->exportValue($this->_name, 'mapper'); diff --git a/CRM/Activity/Import/Form/Preview.php b/CRM/Activity/Import/Form/Preview.php index 3e1bebe603..e6b41f3d22 100644 --- a/CRM/Activity/Import/Form/Preview.php +++ b/CRM/Activity/Import/Form/Preview.php @@ -107,14 +107,12 @@ class CRM_Activity_Import_Form_Preview extends CRM_Import_Form_Preview { */ public function postProcess() { $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapper = $this->controller->exportValue('MapField', 'mapper'); $mapperKeys = array(); $mapperLocType = array(); diff --git a/CRM/Contribute/Import/Form/MapField.php b/CRM/Contribute/Import/Form/MapField.php index 4c68992b6c..9e28e972d0 100644 --- a/CRM/Contribute/Import/Form/MapField.php +++ b/CRM/Contribute/Import/Form/MapField.php @@ -482,11 +482,9 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { } $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapper = $mapperKeys = $mapperKeysMain = $mapperSoftCredit = $softCreditFields = $mapperPhoneType = $mapperSoftCreditType = array(); $mapperKeys = $this->controller->exportValue($this->_name, 'mapper'); diff --git a/CRM/Contribute/Import/Form/Preview.php b/CRM/Contribute/Import/Form/Preview.php index 28c078add2..585d55716a 100644 --- a/CRM/Contribute/Import/Form/Preview.php +++ b/CRM/Contribute/Import/Form/Preview.php @@ -109,15 +109,13 @@ class CRM_Contribute_Import_Form_Preview extends CRM_Import_Form_Preview { */ public function postProcess() { $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); $mapperSoftCreditType = $this->get('mapperSoftCreditType'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapper = $this->controller->exportValue('MapField', 'mapper'); $mapperKeys = array(); $mapperSoftCredit = array(); diff --git a/CRM/Custom/Import/Form/MapField.php b/CRM/Custom/Import/Form/MapField.php index 51d1faedbf..8e51b7a348 100644 --- a/CRM/Custom/Import/Form/MapField.php +++ b/CRM/Custom/Import/Form/MapField.php @@ -136,12 +136,10 @@ class CRM_Custom_Import_Form_MapField extends CRM_Contact_Import_Form_MapField { } $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $separator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $this->_entity = $this->controller->exportValue('DataSource', 'entity'); - $config = CRM_Core_Config::singleton(); - $separator = $config->fieldSeparator; - $mapperKeys = array(); $mapper = array(); $mapperKeys = $this->controller->exportValue($this->_name, 'mapper'); diff --git a/CRM/Custom/Import/Form/Preview.php b/CRM/Custom/Import/Form/Preview.php index 78301032d9..3d772fcda1 100644 --- a/CRM/Custom/Import/Form/Preview.php +++ b/CRM/Custom/Import/Form/Preview.php @@ -82,15 +82,13 @@ class CRM_Custom_Import_Form_Preview extends CRM_Import_Form_Preview { */ public function postProcess() { $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $separator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); $entity = $this->get('_entity'); - $config = CRM_Core_Config::singleton(); - $separator = $config->fieldSeparator; - $mapper = $this->controller->exportValue('MapField', 'mapper'); $mapperKeys = array(); diff --git a/CRM/Event/Import/Form/MapField.php b/CRM/Event/Import/Form/MapField.php index d7fab0ec8c..153fc108cf 100644 --- a/CRM/Event/Import/Form/MapField.php +++ b/CRM/Event/Import/Form/MapField.php @@ -408,17 +408,10 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField { } $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); - $config = CRM_Core_Config::singleton(); - /* CRM - 19192 */ - $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); - if(is_null($seperator)) { - $seperator = $config->fieldSeparator; - } - - - $mapperKeys = array(); + $mapperKeys = array(); $mapper = array(); $mapperKeys = $this->controller->exportValue($this->_name, 'mapper'); $mapperKeysMain = array(); diff --git a/CRM/Event/Import/Form/Preview.php b/CRM/Event/Import/Form/Preview.php index 91c2d5542a..ec46eef7e5 100644 --- a/CRM/Event/Import/Form/Preview.php +++ b/CRM/Event/Import/Form/Preview.php @@ -113,20 +113,13 @@ class CRM_Event_Import_Form_Preview extends CRM_Import_Form_Preview { */ public function postProcess() { $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); - $config = CRM_Core_Config::singleton(); - /* CRM - 19192 */ - $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); - if (is_null($seperator)) { - $seperator = $config->fieldSeparator; - } - - - $mapper = $this->controller->exportValue('MapField', 'mapper'); + $mapper = $this->controller->exportValue('MapField', 'mapper'); $mapperKeys = array(); foreach ($mapper as $key => $value) { diff --git a/CRM/Member/Import/Form/MapField.php b/CRM/Member/Import/Form/MapField.php index c8d4fe983c..b69936e8fc 100644 --- a/CRM/Member/Import/Form/MapField.php +++ b/CRM/Member/Import/Form/MapField.php @@ -419,11 +419,9 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField { } $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapperKeys = array(); $mapper = array(); $mapperKeys = $this->controller->exportValue($this->_name, 'mapper'); diff --git a/CRM/Member/Import/Form/Preview.php b/CRM/Member/Import/Form/Preview.php index 8a41e9e5b5..2a7041f48d 100644 --- a/CRM/Member/Import/Form/Preview.php +++ b/CRM/Member/Import/Form/Preview.php @@ -113,14 +113,12 @@ class CRM_Member_Import_Form_Preview extends CRM_Import_Form_Preview { */ public function postProcess() { $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $seperator = $this->controller->exportValue('DataSource', 'fieldSeparator'); $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); - $config = CRM_Core_Config::singleton(); - $seperator = $config->fieldSeparator; - $mapper = $this->controller->exportValue('MapField', 'mapper'); $mapperKeys = array(); $mapperLocType = array(); -- 2.25.1