From c51bf8546e6b776f8ac684890e90b7ff0e1bf3e9 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 7 Apr 2008 15:32:31 +0000 Subject: Further adventures in getting things to delete correctly git-svn-id: https://code.elgg.org/elgg/trunk@413 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 2 +- engine/lib/entities.php | 6 ++++-- engine/lib/objects.php | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'engine') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index bbb0f7579..dd7f877dd 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -624,8 +624,8 @@ return false; } } - return true; } + return true; } diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 1d77760e8..64aa902de 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -312,7 +312,8 @@ */ public function delete() { - return delete_entity($this->get('guid')); + $res = delete_entity($this->get('guid')); + return $res; } // EXPORTABLE INTERFACE //////////////////////////////////////////////////////////// @@ -693,7 +694,8 @@ if ($entity->canEdit()) { $entity->clearMetadata(); $entity->clearAnnotations(); - return delete_data("DELETE from {$CONFIG->dbprefix}entities where guid={$guid}"); + $res = delete_data("DELETE from {$CONFIG->dbprefix}entities where guid={$guid}"); + return $res; } } } diff --git a/engine/lib/objects.php b/engine/lib/objects.php index ff8ebd558..2ef9cd284 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -128,7 +128,7 @@ if (!parent::delete()) return false; - return delete_object_entity($guid); + return delete_object_entity($this->get('guid')); } /** @@ -223,7 +223,7 @@ $guid = (int)$guid; - $row = get_entity_as_row($guid); + $row = get_object_entity_as_row($guid); // Check to see if we have access and it exists if ($row) @@ -231,7 +231,7 @@ // Delete any existing stuff return delete_data("DELETE from {$CONFIG->dbprefix}objects_entity where guid=$guid"); } - + return false; } -- cgit v1.2.3