aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-13 12:40:20 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-13 12:40:20 +0000
commitd68148908863d2e16b81056e68fda8fffedcafd1 (patch)
treec722a50814faa6b16433eb057ed591f9643c5855 /engine
parent72e090261f572086c42e6673166bc6cc1ccd9b2d (diff)
downloadelgg-d68148908863d2e16b81056e68fda8fffedcafd1.tar.gz
elgg-d68148908863d2e16b81056e68fda8fffedcafd1.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Added delete_entity git-svn-id: https://code.elgg.org/elgg/trunk@195 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php16
1 files changed, 15 insertions, 1 deletions
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?
+ }