From 252990170bc0f55c159328cf186012174cab0a93 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 27 May 2009 16:19:23 +0000 Subject: Delete event now triggered on metadata and annotation delete git-svn-id: https://code.elgg.org/elgg/trunk@3305 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine/lib/annotations.php') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 47903616a..df0f2a043 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -785,8 +785,12 @@ $id = (int)$id; $access = get_access_sql_suffix(); - - return delete_data("DELETE from {$CONFIG->dbprefix}annotations where id=$id and $access"); + $annotation = get_annotation($id); + + if (trigger_elgg_event('delete', 'annotation', $annotation)) + return delete_data("DELETE from {$CONFIG->dbprefix}annotations where id=$id and $access"); + + return false; } /** -- cgit v1.2.3