BUGFIX File upload not working when open_basedir is set #5547

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114471 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Jean-Fabien Barrios 2010-12-03 00:28:30 +00:00
parent 396f297acb
commit 5dbddba41b

View File

@ -257,6 +257,7 @@ class Folder extends File {
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext")) {
// Update with the new image
chmod("$base/$file$ext", Filesystem::$file_create_mask);
return $this->constructChild(basename($file . $ext));
} else {
if(!file_exists($tmpFile['tmp_name'])) user_error("Folder::addUploadToFolder: '$tmpFile[tmp_name]' doesn't exist", E_USER_ERROR);