BUGFIX Redundancy of HTTPRequest when exporting data in SubmittedFormReportField because of recent class name changes

This commit is contained in:
Sean Harvey 2010-01-08 03:04:33 +00:00
parent 468ebf4fcb
commit f0dbf7f917
1 changed files with 5 additions and 1 deletions

View File

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