mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed deprecated File::loadUploaded(), please use Upload directly instead! (from r100495)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105580 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
56ba78b2a5
commit
1e5944c690
@ -237,23 +237,6 @@ class File extends DataObject {
|
||||
return SAPPHIRE_DIR . "/images/app_icons/{$ext}_32.gif";
|
||||
}
|
||||
|
||||
/**
|
||||
* Save an file passed from a form post into this object.
|
||||
* DEPRECATED Please instanciate an Upload-object instead and pass the file
|
||||
* via {Upload->loadIntoFile()}.
|
||||
*
|
||||
* @param $tmpFile array Indexed array that PHP generated for every file it uploads.
|
||||
* @return Boolean|string Either success or error-message.
|
||||
*/
|
||||
function loadUploaded($tmpFile) {
|
||||
user_error('File::loadUploaded is deprecated, please use the Upload class directly.', E_USER_NOTICE);
|
||||
|
||||
$upload = new Upload();
|
||||
$upload->loadIntoFile($tmpFile, $this);
|
||||
|
||||
return $upload->isError();
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be called after the file was uploaded
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user