mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Force the filename (with a .csv extension) when downloading the audit errors as a CSV file.
SVN:trunk[4294]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user