From b6f77aa9b7c4083167cb954196d737c1c45436d2 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 11 Jul 2008 14:34:50 +0000 Subject: relationships are addressable and have working UUIDs, refs #132 git-svn-id: https://code.elgg.org/elgg/trunk@1401 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/relationships.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 4d0db5d66..5313aa841 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -116,12 +116,19 @@ * @return array */ public function export() - { - return new ODDRelationship( + { + global $CONFIG; + + $uuid = $CONFIG->wwwroot . "odd/{$this->guid_one}/relationship/{$this->id}/"; + $relationship = new ODDRelationship( guid_to_uuid($this->guid_one), $this->relationship, guid_to_uuid($this->guid_two) ); + + $relationship->setAttribute('uuid', $uuid); + + return $relationship; } // IMPORTABLE INTERFACE //////////////////////////////////////////////////////////// -- cgit v1.2.3