aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-01 06:25:37 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-01 06:25:37 +0000
commit8015d39e368efb9c568f44f1b2b29c883994557f (patch)
tree81464fbfdb8ac4f251e719ff6c6618c25b84a09e /engine/lib/relationships.php
parent0f3e37266425d77cdbb3c559ad0c43b4557c2933 (diff)
downloadelgg-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.php8
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;
}
/**