diff options
author | Jerome Bakker <jeabakker@coldtrick.com> | 2013-05-30 16:48:33 +0200 |
---|---|---|
committer | Jerome Bakker <jeabakker@coldtrick.com> | 2013-05-30 16:48:33 +0200 |
commit | d90ddd2f9be750d3bf827679f49943166b486ad4 (patch) | |
tree | a0917cdcd199913d556a821f7eba03be8264d8ba /engine/classes/ElggFile.php | |
parent | bf73ef92f79d4ab245f74ff5f7ed065caa2d5ffe (diff) | |
download | elgg-d90ddd2f9be750d3bf827679f49943166b486ad4.tar.gz elgg-d90ddd2f9be750d3bf827679f49943166b486ad4.tar.bz2 |
ElggFile->delete() will return a correct state even for non saved
entities
Diffstat (limited to 'engine/classes/ElggFile.php')
-rw-r--r-- | engine/classes/ElggFile.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/classes/ElggFile.php b/engine/classes/ElggFile.php index 3e9c24c17..23080834b 100644 --- a/engine/classes/ElggFile.php +++ b/engine/classes/ElggFile.php @@ -275,9 +275,14 @@ class ElggFile extends ElggObject { */ public function delete() { $fs = $this->getFilestore(); - if ($fs->delete($this)) { - return parent::delete(); + + $result = $fs->delete($this); + + if ($this->getGUID() && $result) { + $result = parent::delete(); } + + return $result; } /** |