mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
mujma: BUGFIX: Thumbnails are now deleted after saving photo.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42047 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
030b55d750
commit
296344fd15
@ -103,6 +103,7 @@
|
|||||||
if($this->checkFileExists($originalFile) && $this->checkFileExists($editedFile)) {
|
if($this->checkFileExists($originalFile) && $this->checkFileExists($editedFile)) {
|
||||||
if($editedFile != $originalFile && copy($this->url2File($editedFile),$this->url2File($originalFile))) {
|
if($editedFile != $originalFile && copy($this->url2File($editedFile),$this->url2File($originalFile))) {
|
||||||
$image = DataObject::get_one('File','Filename = \'' . substr($this->url2File($originalFile),3) . '\'');
|
$image = DataObject::get_one('File','Filename = \'' . substr($this->url2File($originalFile),3) . '\'');
|
||||||
|
$image->deleteFormattedImages();
|
||||||
$image->generateFormattedImage('AssetLibraryPreview');
|
$image->generateFormattedImage('AssetLibraryPreview');
|
||||||
} else {
|
} else {
|
||||||
$this->raiseError();
|
$this->raiseError();
|
||||||
|
Loading…
Reference in New Issue
Block a user