Permalink
Browse files

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
  • Loading branch information...
1 parent 16f69c3 commit 46b0f0c959d9467e390de12b4b164449bdb124ee @chillu chillu committed Nov 21, 2009
Showing with 7 additions and 0 deletions.
  1. +7 −0 core/model/Image.php
View
@@ -80,6 +80,13 @@ public function exists() {
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.

0 comments on commit 46b0f0c

Please sign in to comment.