From ba96de15a07753e06f02b777d1cfcb0c981d2986 Mon Sep 17 00:00:00 2001 From: icewing Date: Mon, 14 Apr 2008 10:02:33 +0000 Subject: Marcus Povey * Relationships added to GUID browser git-svn-id: https://code.elgg.org/elgg/trunk@441 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/guidbrowser/index.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'mod/guidbrowser/index.php') diff --git a/mod/guidbrowser/index.php b/mod/guidbrowser/index.php index 5b0a8c09d..d842367a5 100644 --- a/mod/guidbrowser/index.php +++ b/mod/guidbrowser/index.php @@ -24,20 +24,26 @@ $key = get_input('key'); $value = get_input('value'); - echo "ACTION $callaction"; + $relationship = get_input('relationship'); + $guid2 = get_input('guid2'); switch ($callaction) { - case 'metadata' : echo "META"; + case 'metadata' : if (!create_metadata($eguid, $key, $value)) - echo "Could not create metadata with $guid:$key:$value"; + echo "Could not create metadata with $eguid:$key:$value"; break; - case 'annotations' : echo "ANNO"; + case 'annotations' : if (!create_annotation($eguid, $key, $value)) - echo "Could not create metadata with $guid:$key:$value"; - break; + echo "Could not create metadata with $eguid:$key:$value"; + break; + + case 'relationship' : + if (!add_entity_relationship($eguid, $relationship, $guid2)) + echo "Could not create relationship between $eguid:$relationship:$guid2"; + break; } // Get the current page's owner -- cgit v1.2.3