From d68148908863d2e16b81056e68fda8fffedcafd1 Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 13 Mar 2008 12:40:20 +0000 Subject: Marcus Povey * Added delete_entity git-svn-id: https://code.elgg.org/elgg/trunk@195 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'engine/lib') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 672409e59..5d9858125 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -363,7 +363,21 @@ return get_data($query, "entity_row_to_elggstar"); } - + /** + * Delete a given entity. + * + * @param int $guid + */ + function delete_entity($guid) + { + global $CONFIG; + + $guid = (int)$guid; + + return delete_data("DELETE from {$CONFIG->dbprefix}entities where where guid=$guid"); + + // TODO: Clean up subtables, or is this better handled by an object or by cascading? + } -- cgit v1.2.3