aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-07 15:32:31 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-07 15:32:31 +0000
commitc51bf8546e6b776f8ac684890e90b7ff0e1bf3e9 (patch)
tree5bbbade3df57d14b84444fa39dc252cb4e55dc8c
parent110f0fa670a03bcd7f95a2d45a42d8a891d70544 (diff)
downloadelgg-c51bf8546e6b776f8ac684890e90b7ff0e1bf3e9.tar.gz
elgg-c51bf8546e6b776f8ac684890e90b7ff0e1bf3e9.tar.bz2
Further adventures in getting things to delete correctly
git-svn-id: https://code.elgg.org/elgg/trunk@413 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/lib/entities.php6
-rw-r--r--engine/lib/objects.php6
3 files changed, 8 insertions, 6 deletions
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;
}