diff options
Diffstat (limited to 'engine/lib')
-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; } /** |