mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
0f7cf9628c
commit
d6ef666925
@ -28,7 +28,7 @@
|
|||||||
Requirements::javascript('cms/javascript/ImageEditor/Crop.js');
|
Requirements::javascript('cms/javascript/ImageEditor/Crop.js');
|
||||||
Requirements::javascript('cms/javascript/ImageEditor/Resize.js');
|
Requirements::javascript('cms/javascript/ImageEditor/Resize.js');
|
||||||
Requirements::javascript('cms/javascript/ImageEditor/ImageBox.js');
|
Requirements::javascript('cms/javascript/ImageEditor/ImageBox.js');
|
||||||
Requirements::javascript('cms/javascript/ImageEditor/ImageEditor.js');
|
Requirements::javascript('cms/javascript/ImageEditor/ImageEditor.js');
|
||||||
|
|
||||||
Requirements::javascript('jsparty/loader.js');
|
Requirements::javascript('jsparty/loader.js');
|
||||||
Requirements::javascript('jsparty/behaviour.js');
|
Requirements::javascript('jsparty/behaviour.js');
|
||||||
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user