From b64c79d34e1e84d28a997d487088e7e707223885 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 6 Jul 2016 10:34:07 +0000 Subject: [PATCH] Force the filename (with a .csv extension) when downloading the audit errors as a CSV file. SVN:trunk[4294] --- pages/audit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/audit.php b/pages/audit.php index f26e31948..252b6fd39 100644 --- a/pages/audit.php +++ b/pages/audit.php @@ -197,6 +197,9 @@ try } else { + $sCSVName = basename($sFileName); // pseudo sanitization, just in case + // Force the name of the downloaded file, since windows gives precedence to the extension over of the mime type + $oP->add_header("Content-disposition: attachment; filename=\"$sCSVName\""); $oP->add_header("Content-type: text/csv; charset=$sCharset"); } $oP->add($sOutputData);