Updated file functions to use HTTPRequest::send_file

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63583 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-03 02:26:43 +00:00
parent 155269c389
commit 33229e74b8
2 changed files with 2 additions and 3 deletions

View File

@ -477,7 +477,7 @@ HTML;
$fileData .= "\n";
}
HTTP::sendFileToBrowser($fileData, $fileName);
return HTTPRequest::send_file($fileData, $fileName);
} else {
user_error("No records found", E_USER_ERROR);
}

View File

@ -92,8 +92,7 @@ class StaticExporter extends Controller {
$content = file_get_contents("/tmp/static-export/$baseFolder.tar.gz");
Filesystem::removeFolder('/tmp/static-export');
HTTP::sendFileToBrowser($content, "$baseFolder.tar.gz");
return null;
return HTTPRequest::send_file($content, "$baseFolder.tar.gz");
} else {
echo _t('StaticExporter.ONETHATEXISTS',"Please specify a folder that exists");