diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 06:25:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 06:25:37 +0000 |
commit | 8015d39e368efb9c568f44f1b2b29c883994557f (patch) | |
tree | 81464fbfdb8ac4f251e719ff6c6618c25b84a09e /engine/lib/relationships.php | |
parent | 0f3e37266425d77cdbb3c559ad0c43b4557c2933 (diff) | |
download | elgg-8015d39e368efb9c568f44f1b2b29c883994557f.tar.gz elgg-8015d39e368efb9c568f44f1b2b29c883994557f.tar.bz2 |
Fixes #1213: delete_relationship() triggers delete:relationship hook.
git-svn-id: http://code.elgg.org/elgg/trunk@3883 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r-- | engine/lib/relationships.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 979d3ea67..789dd4575 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -333,9 +333,13 @@ function delete_relationship($id) { $id = (int)$id; - $result = delete_data("delete from {$CONFIG->dbprefix}entity_relationships where id=$id"); + $relationship = get_relationship($id); - return $result; + if (trigger_elgg_event('delete', 'relationship', $relationship)) { + return delete_data("delete from {$CONFIG->dbprefix}entity_relationships where id=$id"); + } + + return FALSE; } /** |