diff options
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 16 |
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? + } |