Finish removing refs to unused activeFields
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 15 Aug 2022 22:29:04 +0000 (10:29 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 15 Aug 2022 22:29:04 +0000 (10:29 +1200)
CRM/Contact/Import/Parser/Contact.php
CRM/Import/Parser.php

index f730233c1237a0a41c89f75756cb3fba1d0f5054..f132581060aa753efac18df7d43d4895936c8f0a 100644 (file)
@@ -184,7 +184,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
           'importID' => $currentImportID,
           'importTempTable' => $this->_tableName,
           'fieldHeaders' => $this->_mapperKeys,
-          'fields' => $this->_activeFields,
         ];
         CRM_Utils_Hook::import('Contact', 'process', $this, $hookParams);
       }
index 21de5136ead3d879c2bdb7f9bbdb78ebf918d7a3..bd15c7b8b1cf44796aefbad3630226650f39a697 100644 (file)
@@ -375,21 +375,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
     return ((int) $this->getSubmittedValue('onDuplicate')) === CRM_Import_Parser::DUPLICATE_FILL;
   }
 
-  /**
-   * Array of the fields that are actually part of the import process
-   * the position in the array also dictates their position in the import
-   * file
-   * @var array
-   */
-  protected $_activeFields = [];
-
-  /**
-   * Cache the count of active fields
-   *
-   * @var int
-   */
-  protected $_activeFieldCount;
-
   /**
    * Cache of preview rows
    *
@@ -452,26 +437,6 @@ abstract class CRM_Import_Parser implements UserJobInterface {
     $this->_maxLinesToProcess = 0;
   }
 
-  /**
-   * Format the field values for input to the api.
-   *
-   * @return array
-   *   (reference) associative array of name/value pairs
-   */
-  public function &getActiveFieldParams() {
-    $params = [];
-    for ($i = 0; $i < $this->_activeFieldCount; $i++) {
-      if (isset($this->_activeFields[$i]->_value)
-        && !isset($params[$this->_activeFields[$i]->_name])
-        && !isset($this->_activeFields[$i]->_related)
-      ) {
-
-        $params[$this->_activeFields[$i]->_name] = $this->_activeFields[$i]->_value;
-      }
-    }
-    return $params;
-  }
-
   /**
    * Add progress bar to the import process. Calculates time remaining, status etc.
    *