From b32a22535f4b41187475618769d0a4d07aba6684 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Wed, 13 May 2009 11:54:48 +0000 Subject: added relationship between user and photo when tagged - this will enable searching for all photos that include user x --- actions/addtag.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/actions/addtag.php b/actions/addtag.php index 562d53882..dc4274728 100644 --- a/actions/addtag.php +++ b/actions/addtag.php @@ -1,6 +1,6 @@ annotate('phototag', serialize($tag), $access_id, $owner_id)) { + // if tag is a user id, add relationship for searching (find all images with user x) + if ($relationships_type === 'user') { + if (!check_entity_relationship($user_id, 'phototag', $image_guid)) + add_entity_relationship($user_id, 'phototag', $image_guid); + } + system_message(elgg_echo("tidypics:phototagging:success")); } -- cgit v1.2.3