diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-27 16:21:40 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-27 16:21:40 +0000 |
commit | 3aeb6fcf7a5fab9050803e49af7cab6ea094ba4e (patch) | |
tree | 4cdf4a0a36703d83d43561a106bb3036599d9be3 /engine/lib/annotations.php | |
parent | a3fb93cc2fe7461b2aadac4ead9e16c24eeb0aa6 (diff) | |
download | elgg-3aeb6fcf7a5fab9050803e49af7cab6ea094ba4e.tar.gz elgg-3aeb6fcf7a5fab9050803e49af7cab6ea094ba4e.tar.bz2 |
Fixes #1419: Added remove_from_river_by_annotation(). Deleting annotations now deletes their river entry.
git-svn-id: http://code.elgg.org/elgg/trunk@3850 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r-- | engine/lib/annotations.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 2ca977a09..6d5c0b46a 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -1136,10 +1136,11 @@ function delete_annotation($id) { $annotation = get_annotation($id); if (trigger_elgg_event('delete', 'annotation', $annotation)) { - return delete_data("DELETE from {$CONFIG->dbprefix}annotations where id=$id and $access"); + remove_from_river_by_annotation($id); + return delete_data("DELETE from {$CONFIG->dbprefix}annotations where id=$id and $access"); } - return false; + return FALSE; } /** @@ -1255,4 +1256,4 @@ function register_annotation_url_handler($function_name, $extender_name = "all") } /** Register the hook */ -register_plugin_hook("export", "all", "export_annotation_plugin_hook", 2);
\ No newline at end of file +register_plugin_hook("export", "all", "export_annotation_plugin_hook", 2); |