-- fix for contribution import break found during QA of issue CRM-9744
authorRavish Nair <ravish.nair@webaccess.co.in>
Wed, 17 Jul 2013 10:48:39 +0000 (16:18 +0530)
committerRavish Nair <ravish.nair@webaccess.co.in>
Wed, 17 Jul 2013 10:48:39 +0000 (16:18 +0530)
----------------------------------------
* 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
CRM/Contribute/Import/Form/Preview.php
CRM/Contribute/Import/Parser.php

index 911fcc56dabaf31c35ffabad5f8b190730030201..a45d17f8c50960484719cb55b548c75d922fd35a 100644 (file)
@@ -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;
index 439815f51d47094652bff3a63a8dfdd06894fddb..e0860480cc3fe19a4725817ab0533a119f369e80 100644 (file)
@@ -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');
index 61615641a3bbd17df6b89d7ac4a6a24fdb3b3f54..b6736d12631cf65e340bc78a0c0b66685f2fa5fd 100644 (file)
@@ -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;