From: Seamus Lee Date: Fri, 13 Sep 2019 20:41:34 +0000 (+1000) Subject: Also stop passing exportMode by reference in the hook and add deprecated function... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ca934663f25511f85696a60a7d1cbeafd58c3197;p=civicrm-core.git Also stop passing exportMode by reference in the hook and add deprecated function warning for if change --- 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,