aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/relationships.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index 4316fc695..d8e7d7abe 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -417,8 +417,12 @@
$guid_one = (int)$guid_one;
$relationship = sanitise_string($relationship);
$guid_two = (int)$guid_two;
-
- return delete_data("DELETE from {$CONFIG->dbprefix}entity_relationships where guid_one=$guid_one and relationship='$relationship' and guid_two=$guid_two");
+
+ if (trigger_elgg_event('delete', $relationship, $obj)) {
+ return delete_data("DELETE from {$CONFIG->dbprefix}entity_relationships where guid_one=$guid_one and relationship='$relationship' and guid_two=$guid_two");
+ } else {
+ return false;
+ }
}
/**