* Deprecated search_list*().
* Added elgg_deprecated_notice().
* ElggEntity::countEntitiesFromRelationship() supports inverse relationships. #1325
+ * delete_relationship() triggers the hook delete:relationship and passes the relationship object. #1213
Services API:
* Separated user and api authenticate processing
$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;
}
/**