From 5ae1c8dc2d2c2943734cebd153123fa1970ba4ab Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 25 Nov 2019 16:06:08 +1300 Subject: [PATCH] Remove unused parameter There are 3 calls to writeCSVFile - none of them pass in saveFile so it can be removed --- CRM/Core/Report/Excel.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Core/Report/Excel.php b/CRM/Core/Report/Excel.php index 4d9ca60f3264..26b7f728044b 100644 --- a/CRM/Core/Report/Excel.php +++ b/CRM/Core/Report/Excel.php @@ -185,13 +185,11 @@ public function writeHTMLFile($fileName, $header, $rows, $titleHeader = NULL, $o * If set this will be the title in the CSV. * @param bool $outputHeader * Should we output the header row. - * @param bool $saveFile - * -. * * @return void */ - public static function writeCSVFile($fileName, $header, $rows, $titleHeader = NULL, $outputHeader = TRUE, $saveFile = NULL) { - if ($outputHeader && !$saveFile) { + public static function writeCSVFile($fileName, $header, $rows, $titleHeader = NULL, $outputHeader = TRUE) { + if ($outputHeader) { CRM_Utils_System::download(CRM_Utils_String::munge($fileName), 'text/x-csv', CRM_Core_DAO::$_nullObject, @@ -201,11 +199,7 @@ public static function writeCSVFile($fileName, $header, $rows, $titleHeader = NU } if (!empty($rows)) { - $print = TRUE; - if ($saveFile) { - $print = FALSE; - } - return self::makeCSVTable($header, $rows, $titleHeader, $print, $outputHeader); + return self::makeCSVTable($header, $rows, $titleHeader, TRUE, $outputHeader); } }