diff options
author | Cash Costello <cash.costello@gmail.com> | 2013-05-30 16:13:58 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-05-30 16:13:58 -0700 |
commit | 2151c77194a2ac0a8bb85a7c5800d8af81452d62 (patch) | |
tree | 4ace3e86100a2a4b37a076a99749dd5b6bb7a615 /engine/classes/ElggFile.php | |
parent | b980c75fdf5c1fecb267b8984f9ec363c1ae5658 (diff) | |
parent | d90ddd2f9be750d3bf827679f49943166b486ad4 (diff) | |
download | elgg-2151c77194a2ac0a8bb85a7c5800d8af81452d62.tar.gz elgg-2151c77194a2ac0a8bb85a7c5800d8af81452d62.tar.bz2 |
Merge pull request #5563 from jeabakker/better-result-for-elggfile-delete
ElggFile->delete() can return false on success or null on failure
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; } /** |