diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-13 11:17:44 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-13 11:17:44 +0000 |
commit | 10d2d5f1aec057ab5023890d407b59e2366c4398 (patch) | |
tree | d3c18cc54f6eb3babcb7b3acc5178edb352ff629 /engine | |
parent | 95b89b5b595d688b54abc98158623ecdea40d330 (diff) | |
download | elgg-10d2d5f1aec057ab5023890d407b59e2366c4398.tar.gz elgg-10d2d5f1aec057ab5023890d407b59e2366c4398.tar.bz2 |
Fixes #241: Changed order, delete user using object's delete method rather than the low level function
git-svn-id: https://code.elgg.org/elgg/trunk@1887 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/group.php | 6 | ||||
-rw-r--r-- | engine/lib/objects.php | 10 | ||||
-rw-r--r-- | engine/lib/sites.php | 4 | ||||
-rw-r--r-- | engine/lib/users.php | 9 |
4 files changed, 16 insertions, 13 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php index f9bcd4b32..da5647663 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -261,10 +261,12 @@ */ public function delete() { - if (!parent::delete()) + + if (!delete_group_entity($this->get('guid'))) return false; - return delete_group_entity($this->get('guid')); + return parent::delete(); + } diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 69f4f709a..1815ac717 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -127,11 +127,11 @@ * @return true|false
*/
public function delete()
- {
- if (!parent::delete())
- return false;
-
- return delete_object_entity($this->get('guid'));
+ { + if (!delete_object_entity($this->get('guid'))) + return false; + + return parent::delete();
}
/**
diff --git a/engine/lib/sites.php b/engine/lib/sites.php index 16e4c6614..add5424e2 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -135,10 +135,10 @@ */ public function delete() { - if (!parent::delete()) + if (!delete_site_entity($this->get('guid'))) return false; - return delete_site_entity($this->get('guid')); + return parent::delete(); } /** diff --git a/engine/lib/users.php b/engine/lib/users.php index 5f4866af4..66696ea07 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -149,11 +149,12 @@ * @return true|false
*/
public function delete()
- {
- if (!parent::delete())
- return false;
+ { + if (!delete_user_entity($this->get('guid'))) + return false; +
+ return parent::delete();
- return delete_user_entity($this->get('guid'));
}
/**
|