mujma: ENHANCEMENTS: Tmp folder name changed to _tmp, depends on r38621 in sapphire branch.

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41993 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 00:53:45 +00:00
parent 0f7cf9628c
commit d6ef666925

View File

@ -76,8 +76,8 @@
break; break;
} }
$rand = md5(rand(1,100000)); $rand = md5(rand(1,100000));
$gd->writeTo('../assets/tmp/' . $rand . '.jpg'); $gd->writeTo('../assets/_tmp/' . $rand . '.' . $fileInfo['extension']);
return $this->getImageInfoInJSON($gd,'assets/tmp/' . $rand . '.jpg'); return $this->getImageInfoInJSON($gd,'assets/_tmp/' . $rand . '.' . $fileInfo['extension']);
} }
/** /**
@ -122,7 +122,12 @@
*/ */
public function close() { public function close() {
Filesystem::removeFolder('../assets/tmp'); $tmpDir = '../assets/_tmp';
if(file_exists($tmpDir)) {
Filesystem::removeFolder($tmpDir);
mkdir($tmpDir);
chmod($tmpDir, 02775);
}
} }
/** /**