Force the filename (with a .csv extension) when downloading the audit errors as a CSV file.

SVN:trunk[4294]
This commit is contained in:
Denis Flaven
2016-07-06 10:34:07 +00:00
parent e553c0bbe1
commit b64c79d34e

View File

@@ -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);