From e7ba58970f4ff5a7fa62bb680ac49c27c1918837 Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Wed, 13 Oct 2010 21:04:22 +0000 Subject: [PATCH] BUGFIX: provide default file format, as Windows is unable to detect the mime type, and exit after the file is served so the headers will not get overwritten. --- code/submissions/SubmittedFormReportField.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/submissions/SubmittedFormReportField.php b/code/submissions/SubmittedFormReportField.php index ce50b79..edef27b 100755 --- a/code/submissions/SubmittedFormReportField.php +++ b/code/submissions/SubmittedFormReportField.php @@ -143,7 +143,8 @@ class SubmittedFormReportField extends FormField { return $csvData; } else { - SS_HTTPRequest::send_file($csvData, $fileName)->output(); + SS_HTTPRequest::send_file($csvData, $fileName, 'text/csv')->output(); + exit; } } else { user_error("'$SQL_ID' is a valid type, but we can't find a UserDefinedForm in the database that matches the ID.", E_USER_ERROR);