[REF] [Import] Remove always NULL parameter from private function
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 5 May 2022 06:08:07 +0000 (18:08 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 5 May 2022 10:59:54 +0000 (22:59 +1200)
CRM/Import/DataSource/CSV.php

index f4a3f756b97b00f82624137d8a83b082ab9fd461..d8a64f8c0f5e9aff26e0bc1692c26f04a5f7e0b0 100644 (file)
@@ -83,7 +83,6 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
     $result = self::_CsvToTable(
       $file,
       $firstRowIsColumnHeader,
-      NULL,
       CRM_Utils_Array::value('fieldSeparator', $params, ',')
     );
 
@@ -103,8 +102,6 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
    *   File name to load.
    * @param bool $headers
    *   Whether the first row contains headers.
-   * @param string $tableName
-   *   Name of table from which data imported.
    * @param string $fieldSeparator
    *   Character that separates the various columns in the file.
    *
@@ -115,7 +112,6 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
   private static function _CsvToTable(
     $file,
     $headers = FALSE,
-    $tableName = NULL,
     $fieldSeparator = ','
   ) {
     $result = [];
@@ -184,9 +180,6 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
       }
     }
 
-    if ($tableName) {
-      CRM_Core_DAO::executeQuery("DROP TABLE IF EXISTS $tableName");
-    }
     $table = CRM_Utils_SQL_TempTable::build()->setDurable();
     $tableName = $table->getName();
     CRM_Core_DAO::executeQuery("DROP TABLE IF EXISTS $tableName");