From df4226866779f75eacab7f62da36b22dc21d5e44 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 23:42:26 +0000 Subject: Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like groups and wire) git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/annotations.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engine/lib/annotations.php') diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index dcb29d0ab..7f5ab93f2 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -206,7 +206,9 @@ function create_annotation($entity_guid, $name, $value, $value_type, $owner_guid if (trigger_elgg_event('create', 'annotation', $obj)) { return $result; } else { + // plugin returned false to reject annotation delete_annotation($result); + return FALSE; } } } @@ -263,6 +265,7 @@ function update_annotation($annotation_id, $name, $value, $value_type, $owner_gu if (trigger_elgg_event('update', 'annotation', $obj)) { return true; } else { + // @todo add plugin hook that sends old and new annotation information before db access delete_annotation($annotation_id); } } -- cgit v1.2.3