Skip to content

Commit

Permalink
Remove outputHeader as a param for writeCSVFile as it is always true
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Apr 10, 2020
1 parent 2e239e3 commit eab68b0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions CRM/Core/Report/Excel.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,17 @@ public function writeHTMLFile($fileName, $header, $rows, $titleHeader = NULL, $o
*
* @return void
*/
public static function writeCSVFile($fileName, $header, $rows, $outputHeader = TRUE) {
if ($outputHeader) {
CRM_Utils_System::download(CRM_Utils_String::munge($fileName),
'text/x-csv',
CRM_Core_DAO::$_nullObject,
'csv',
FALSE
);
}
public static function writeCSVFile($fileName, $header, $rows) {
$null = NULL;
CRM_Utils_System::download(CRM_Utils_String::munge($fileName),
'text/x-csv',
$null,
'csv',
FALSE
);

if (!empty($rows)) {
return self::makeCSVTable($header, $rows, $outputHeader);
return self::makeCSVTable($header, $rows, TRUE);
}
}

Expand Down

0 comments on commit eab68b0

Please sign in to comment.