Permalink
Browse files

chore(relationships): Removes the deprecated relationship create event

Fixes #5998

BREAKING CHANGE:
Relationship additions only fire the “create”, “relationship” event.
  • Loading branch information...
mrclay committed Jun 21, 2015
1 parent 51421bb commit 3517bd0fef6dd6d4b548baff9a84fbb4b3c70e2a
Showing with 6 additions and 4 deletions.
  1. +5 −0 docs/guides/upgrading.rst
  2. +1 −4 engine/classes/Elgg/Database/RelationshipsTable.php
@@ -143,6 +143,11 @@ Comments plugin hook
Plugins can now return an empty string from ``'comments',$entity_type`` hook in order to override the default comments component view. To force the default comments component, your plugin must return ``false``. If you were using empty strings to force the default comments view, you need to update your hook handlers to return ``false``.
Creating a relationship triggers only one event
-----------------------------------------------
Entity relationship creation no longer fires the legacy "create" event using the relationship name as the type. E.g. Listening for the ``"create", "member"`` event will no longer capture group membership additions. Use the ``"create", "relationship"`` event.
Dropped login-over-https feature
--------------------------------
@@ -117,11 +117,8 @@ function add($guid_one, $relationship, $guid_two) {
if ($id !== false) {
$obj = get_relationship($id);
// this event has been deprecated in 1.9. Use 'create', 'relationship'
$result_old = _elgg_services()->events->trigger('create', $relationship, $obj);
$result = _elgg_services()->events->trigger('create', 'relationship', $obj);
if ($result && $result_old) {
if ($result) {
return true;
} else {
delete_relationship($result);

0 comments on commit 3517bd0

Please sign in to comment.