BUGFIX File upload not working when open_basedir is set #5547

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

View File

@ -200,12 +200,6 @@ JS
}
if($tmpFile['tmp_name']) {
// Workaround open_basedir problems
if(ini_get("open_basedir")) {
$newtmp = TEMP_FOLDER . '/' . $tmpFile['name'];
move_uploaded_file($tmpFile['tmp_name'], $newtmp);
$tmpFile['tmp_name'] = $newtmp;
}
// validate files (only if not logged in as admin)
if(!File::$apply_restrictions_to_admin && Permission::check('ADMIN')) {