diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-01 17:55:18 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-01 17:55:18 +0000 |
commit | 7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 (patch) | |
tree | 1070be6b85c5a2327163cb0326dfbcbc62f10d62 /mod/file/classes/FilePluginFile.php | |
parent | 07ffe6464b453fd90cd2833fc55f804c57c52b4a (diff) | |
download | elgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.gz elgg-7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52.tar.bz2 |
almost finished updating the file plugin to work with new html/css
git-svn-id: http://code.elgg.org/elgg/trunk@7804 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/classes/FilePluginFile.php')
-rw-r--r-- | mod/file/classes/FilePluginFile.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/file/classes/FilePluginFile.php b/mod/file/classes/FilePluginFile.php index 7397bfa4b..edf914231 100644 --- a/mod/file/classes/FilePluginFile.php +++ b/mod/file/classes/FilePluginFile.php @@ -13,4 +13,19 @@ class FilePluginFile extends ElggFile { public function __construct($guid = null) { parent::__construct($guid); } + + public function delete() { + + $thumbnails = array($this->thumbnail, $this->smallthumb, $this->largethumb); + foreach ($thumbnails as $thumbnail) { + if ($thumbnail) { + $delfile = new ElggFile(); + $delfile->owner_guid = $this->owner_guid; + $delfile->setFilename($thumbnail); + $delfile->delete(); + } + } + + return parent::delete(); + } } |