ENHANCEMENT Deleting formatted images in Image->onBeforeDelete()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92556 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:32:43 +00:00
parent 16f69c3080
commit 46b0f0c959

View File

@ -81,6 +81,13 @@ class Image extends File {
} }
} }
function onBeforeDelete() {
parent::onBeforeDelete();
// Delete the temp verions of this file in assets/_resampled
$this->deleteFormattedImages();
}
/** /**
* Get the relative URL for this Image. * Get the relative URL for this Image.
* Overwrites File->URL() which returns an absolute URL. * Overwrites File->URL() which returns an absolute URL.