aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 11:17:44 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 11:17:44 +0000
commit10d2d5f1aec057ab5023890d407b59e2366c4398 (patch)
treed3c18cc54f6eb3babcb7b3acc5178edb352ff629 /engine
parent95b89b5b595d688b54abc98158623ecdea40d330 (diff)
downloadelgg-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.php6
-rw-r--r--engine/lib/objects.php10
-rw-r--r--engine/lib/sites.php4
-rw-r--r--engine/lib/users.php9
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'));
}
/**