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:
Ingo Schommer 2007-09-16 02:23:42 +00:00
parent 030b55d750
commit 296344fd15

View File

@ -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();