From c33484c79c2e717dfb6fd33065843c8baf4d346f Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 17 Jul 2019 11:03:21 +1200 Subject: [PATCH] Use columns from processor instead of passing them --- CRM/Export/BAO/Export.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index e0f42e913a..61d1ca5395 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -233,7 +233,7 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c } if ($processor->getTemporaryTable()) { - self::writeDetailsToTable($processor, $componentDetails, $sqlColumns); + self::writeDetailsToTable($processor, $componentDetails); // do merge same address and merge same household processing if ($mergeSameAddress) { @@ -363,9 +363,8 @@ INSERT INTO {$componentTable} SELECT distinct gc.contact_id FROM civicrm_group_c /** * @param \CRM_Export_BAO_ExportProcessor $processor * @param $details - * @param $sqlColumns */ - public static function writeDetailsToTable($processor, $details, $sqlColumns) { + public static function writeDetailsToTable($processor, $details) { $tableName = $processor->getTemporaryTable(); if (empty($details)) { return; @@ -396,7 +395,7 @@ FROM $tableName } $sqlClause[] = '(' . implode(',', $valueString) . ')'; } - $sqlColumns = array_merge(['id' => 1], $sqlColumns); + $sqlColumns = array_merge(['id' => 1], $processor->getSQLColumns()); $sqlColumnString = '(' . implode(',', array_keys($sqlColumns)) . ')'; $sqlValueString = implode(",\n", $sqlClause); -- 2.25.1