From bf3adfdb3906567227d24ee8b2a001f4eac222a3 Mon Sep 17 00:00:00 2001 From: Ravish Nair Date: Wed, 17 Jul 2013 16:18:39 +0530 Subject: [PATCH] -- fix for contribution import break found during QA of issue CRM-9744 ---------------------------------------- * CRM-9744: Using Soft Credit Contribution Feature with External ID Fails http://issues.civicrm.org/jira/browse/CRM-9744 --- CRM/Contribute/Import/Form/MapField.php | 6 +++--- CRM/Contribute/Import/Form/Preview.php | 6 +++--- CRM/Contribute/Import/Parser.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CRM/Contribute/Import/Form/MapField.php b/CRM/Contribute/Import/Form/MapField.php index 911fcc56da..a45d17f8c5 100644 --- a/CRM/Contribute/Import/Form/MapField.php +++ b/CRM/Contribute/Import/Form/MapField.php @@ -56,7 +56,7 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { $this->_dataValues = $this->get('dataValues'); $this->assign('dataValues', $this->_dataValues); - $skipColumnHeader = $this->controller->exportValue('UploadFile', 'skipColumnHeader'); + $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $this->_onDuplicate = $this->get('onDuplicate', isset($onDuplicate) ? $onDuplicate : ""); if ($skipColumnHeader) { @@ -464,8 +464,8 @@ class CRM_Contribute_Import_Form_MapField extends CRM_Import_Form_MapField { return; } - $fileName = $this->controller->exportValue('UploadFile', 'uploadFile'); - $skipColumnHeader = $this->controller->exportValue('UploadFile', 'skipColumnHeader'); + $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $config = CRM_Core_Config::singleton(); $seperator = $config->fieldSeparator; diff --git a/CRM/Contribute/Import/Form/Preview.php b/CRM/Contribute/Import/Form/Preview.php index 439815f51d..e0860480cc 100644 --- a/CRM/Contribute/Import/Form/Preview.php +++ b/CRM/Contribute/Import/Form/Preview.php @@ -46,7 +46,7 @@ class CRM_Contribute_Import_Form_Preview extends CRM_Import_Form_Preview { * @access public */ public function preProcess() { - $skipColumnHeader = $this->controller->exportValue('UploadFile', 'skipColumnHeader'); + $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); //get the data from the session $dataValues = $this->get('dataValues'); @@ -112,8 +112,8 @@ class CRM_Contribute_Import_Form_Preview extends CRM_Import_Form_Preview { * @access public */ public function postProcess() { - $fileName = $this->controller->exportValue('UploadFile', 'uploadFile'); - $skipColumnHeader = $this->controller->exportValue('UploadFile', 'skipColumnHeader'); + $fileName = $this->controller->exportValue('DataSource', 'uploadFile'); + $skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader'); $invalidRowCount = $this->get('invalidRowCount'); $conflictRowCount = $this->get('conflictRowCount'); $onDuplicate = $this->get('onDuplicate'); diff --git a/CRM/Contribute/Import/Parser.php b/CRM/Contribute/Import/Parser.php index 61615641a3..b6736d1263 100644 --- a/CRM/Contribute/Import/Parser.php +++ b/CRM/Contribute/Import/Parser.php @@ -572,7 +572,7 @@ pppp * @return void fclose($fd); } - function errorFileName($type) { + static function errorFileName($type) { $fileName = NULL; if (empty($type)) { return $fileName; @@ -598,7 +598,7 @@ pppp * @return void return $fileName; } - function saveFileName($type) { + static function saveFileName($type) { $fileName = NULL; if (empty($type)) { return $fileName; -- 2.25.1