From 10d2d5f1aec057ab5023890d407b59e2366c4398 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 13 Aug 2008 11:17:44 +0000 Subject: 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 --- engine/lib/group.php | 6 ++++-- engine/lib/objects.php | 10 +++++----- engine/lib/sites.php | 4 ++-- engine/lib/users.php | 9 +++++---- 4 files changed, 16 insertions(+), 13 deletions(-) (limited to 'engine') 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')); } /** -- cgit v1.2.3