API CHANGE Removed @deprecated 2.3 function HTTP::sendFileToBrowser(): Please use HTTPRequest::send_file() instead

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77357 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-05-20 05:16:00 +00:00
parent fb6cb44c4e
commit 2e742d0399

View File

@ -127,19 +127,7 @@ class HTTP {
static function getImagesIn($content) {
return self::findByTagAndAttribute($content, array("img" => "src"));
}
/**
* Outputs appropriate header for downloading a file
* exits() after the call, so that no further output is given.
*
* @deprecated 2.3 Return a HTTPRequest::send_file() object instead
*/
static function sendFileToBrowser($fileData, $fileName, $mimeType = false) {
user_error("HTTP::sendFileToBrowser() deprecated; return a HTTPRequest::send_file() object instead", E_USER_NOTICE);
HTTPRequest::send_file($fileData, $fileName, $mimeType)->output();
exit(0);
}
/*
* Get mime type based on extension
*/