From ca934663f25511f85696a60a7d1cbeafd58c3197 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 14 Sep 2019 06:41:34 +1000 Subject: [PATCH] Also stop passing exportMode by reference in the hook and add deprecated function warning for if change --- CRM/Export/BAO/ExportProcessor.php | 3 +++ CRM/Utils/Hook.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Export/BAO/ExportProcessor.php b/CRM/Export/BAO/ExportProcessor.php index 6983115f75..b46e41e283 100644 --- a/CRM/Export/BAO/ExportProcessor.php +++ b/CRM/Export/BAO/ExportProcessor.php @@ -2359,6 +2359,9 @@ WHERE id IN ( $deleteIDString ) if ($exportMode !== $this->getExportMode() || $componentTable !== $this->getComponentTable()) { CRM_Core_Error::deprecatedFunctionWarning('altering the export mode and/or component table in the hook is no longer supported.'); } + if ($ids !== $this->getIds()) { + CRM_Core_Error::deprecatedFunctionWarning('altering the ids in the hook is no longer supported.'); + } if ($exportTempTable !== $this->getTemporaryTable()) { CRM_Core_Error::deprecatedFunctionWarning('altering the export table in the hook is deprecated (in some flows the table itself will be)'); $this->setTemporaryTable($exportTempTable); diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index a8cd7e18d5..76887f2bc3 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1368,7 +1368,7 @@ abstract class CRM_Utils_Hook { * * @return mixed */ - public static function export(&$exportTempTable, &$headerRows, &$sqlColumns, &$exportMode, $componentTable, $ids) { + public static function export(&$exportTempTable, &$headerRows, &$sqlColumns, $exportMode, $componentTable, $ids) { return self::singleton()->invoke(['exportTempTable', 'headerRows', 'sqlColumns', 'exportMode', 'componentTable', 'ids'], $exportTempTable, $headerRows, $sqlColumns, $exportMode, $componentTable, $ids, -- 2.25.1