Skip to content

Commit

Permalink
ENHANCEMENT Deleting formatted images in Image->onBeforeDelete()
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92556 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 16f69c3 commit 46b0f0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/model/Image.php
Expand Up @@ -80,6 +80,13 @@ public function exists() {
return true; 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. * Get the relative URL for this Image.
Expand Down

0 comments on commit 46b0f0c

Please sign in to comment.