aboutsummaryrefslogtreecommitdiff
path: root/mod/file/classes/FilePluginFile.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-01 17:55:18 +0000
commit7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 (patch)
tree1070be6b85c5a2327163cb0326dfbcbc62f10d62 /mod/file/classes/FilePluginFile.php
parent07ffe6464b453fd90cd2833fc55f804c57c52b4a (diff)
downloadelgg-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.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();
+ }
}