From 7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Jan 2011 17:55:18 +0000 Subject: 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 --- mod/file/classes/FilePluginFile.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mod/file/classes/FilePluginFile.php') 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(); + } } -- cgit v1.2.3