aboutsummaryrefslogtreecommitdiff
path: root/mod/file/classes/FilePluginFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/classes/FilePluginFile.php')
-rw-r--r--mod/file/classes/FilePluginFile.php15
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();
+ }
}