aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-10 22:22:40 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-10 22:22:40 +0000
commitc8f6c3c934df01bf969e3d91ae67f0887de10da9 (patch)
treed21179fda1e19d540eb3ea56b31584f86fc1e338 /engine/lib/relationships.php
parenta7801c71ecc6ce0f0d2a8fc82cdc779da9417aa4 (diff)
downloadelgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.gz
elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.bz2
Fixes #2367: With fear and trepidation, converting events/plugin hooks to use elgg_ prefixed versions
git-svn-id: http://code.elgg.org/elgg/trunk@7284 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r--engine/lib/relationships.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index e09493c74..0b6b9b607 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -52,7 +52,7 @@ function delete_relationship($id) {
$relationship = get_relationship($id);
- if (trigger_elgg_event('delete', 'relationship', $relationship)) {
+ if (elgg_trigger_event('delete', 'relationship', $relationship)) {
return delete_data("delete from {$CONFIG->dbprefix}entity_relationships where id=$id");
}
@@ -90,7 +90,7 @@ function add_entity_relationship($guid_one, $relationship, $guid_two) {
if ($result !== false) {
$obj = get_relationship($result);
- if (trigger_elgg_event('create', $relationship, $obj)) {
+ if (elgg_trigger_event('create', $relationship, $obj)) {
return true;
} else {
delete_relationship($result);
@@ -151,7 +151,7 @@ function remove_entity_relationship($guid_one, $relationship, $guid_two) {
return false;
}
- if (trigger_elgg_event('delete', $relationship, $obj)) {
+ if (elgg_trigger_event('delete', $relationship, $obj)) {
$query = "DELETE from {$CONFIG->dbprefix}entity_relationships
where guid_one=$guid_one
and relationship='$relationship'
@@ -867,10 +867,10 @@ function relationship_notification_hook($event, $object_type, $object) {
}
/** Register the import hook */
-register_plugin_hook("import", "all", "import_relationship_plugin_hook", 3);
+elgg_register_plugin_hook_handler("import", "all", "import_relationship_plugin_hook", 3);
/** Register the hook, ensuring entities are serialised first */
-register_plugin_hook("export", "all", "export_relationship_plugin_hook", 3);
+elgg_register_plugin_hook_handler("export", "all", "export_relationship_plugin_hook", 3);
/** Register event to listen to some events **/
-register_elgg_event_handler('create', 'friend', 'relationship_notification_hook');
+elgg_register_event_handler('create', 'friend', 'relationship_notification_hook');