From f0dbf7f91769151d156760d219585806fe9ba6c6 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 8 Jan 2010 03:04:33 +0000 Subject: [PATCH] BUGFIX Redundancy of HTTPRequest when exporting data in SubmittedFormReportField because of recent class name changes --- code/submissions/SubmittedFormReportField.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/submissions/SubmittedFormReportField.php b/code/submissions/SubmittedFormReportField.php index ac9074d..e201b4c 100755 --- a/code/submissions/SubmittedFormReportField.php +++ b/code/submissions/SubmittedFormReportField.php @@ -138,7 +138,11 @@ class SubmittedFormReportField extends FormField { user_error("No submissions to export.", E_USER_ERROR); } - SS_HTTPRequest::send_file($csvData, $fileName)->output(); + if(class_exists('SS_HTTPRequest')) { + SS_HTTPRequest::send_file($csvData, $fileName)->output(); + } else { + HTTPRequest::send_file($csvData, $fileName)->output(); + } } 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);