From 46fc19c79fcd51bfdd86642bbdea7b2910a59a23 Mon Sep 17 00:00:00 2001 From: icewing Date: Wed, 30 Apr 2008 15:22:41 +0000 Subject: Marcus Povey * Changed "verb" to "type" in relationship, as described in ODD spec 0.5 git-svn-id: https://code.elgg.org/elgg/trunk@582 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/relationships.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'engine/lib/relationships.php') diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index a3bb10ca1..071e5ece2 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -115,14 +115,10 @@ * @return array */ public function export() - { - $verb = get_verb_from_relationship($this->relationship); - if (!$verb) - throw new ExportException("There is no verb mapping for '{$this->relationship}'."); - + { return new ODDRelationship( guid_to_uuid($this->guid_one), - $verb, + $this->relationship, guid_to_uuid($this->guid_two) ); } @@ -155,8 +151,9 @@ $this->attributes['guid_two'] = $entity2->getGUID(); // Map verb to relationship - $verb = $data->getAttribute('verb'); - $relationship = get_relationship_from_verb($verb); + //$verb = $data->getAttribute('verb'); + //$relationship = get_relationship_from_verb($verb); + $relationship = $data->getAttribute('type'); if ($relationship) { @@ -477,8 +474,8 @@ } /** Register the import hook */ - register_plugin_hook("import", "all", "import_relationship_plugin_hook", 1); + register_plugin_hook("import", "all", "import_relationship_plugin_hook", 3); /** Register the hook, ensuring entities are serialised first */ - register_plugin_hook("export", "all", "export_relationship_plugin_hook", 1); + register_plugin_hook("export", "all", "export_relationship_plugin_hook", 3); ?> \ No newline at end of file -- cgit v1.2.3