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

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