From 6061b39ac74181e00b58bdede9095502e9e6bec9 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 18 Jun 2009 00:57:27 +0000 Subject: forgot to delete relationship created when tagging with users --- actions/deletetag.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'actions/deletetag.php') diff --git a/actions/deletetag.php b/actions/deletetag.php index cd76b0a1d..748d00380 100644 --- a/actions/deletetag.php +++ b/actions/deletetag.php @@ -7,7 +7,6 @@ gatekeeper(); action_gatekeeper(); - //$user_id = get_input('user_id'); $image_guid = get_input('image_guid'); $tags = get_input('tags'); @@ -40,6 +39,13 @@ } } + // delete relationship if this tag is a user + $annotation = get_annotation($id); + $photo_tag = unserialize($annotation->value); + if ($photo_tag->type == 'user') { + remove_entity_relationship($photo_tag->value, 'phototag', $image_guid); + } + // delete the photo tag annotation delete_annotation($id); } -- cgit v1.2.3