mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
155269c389
commit
33229e74b8
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user