From: Cash Costello Date: Thu, 18 Jun 2009 00:57:27 +0000 (+0000) Subject: forgot to delete relationship created when tagging with users X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6061b39ac74181e00b58bdede9095502e9e6bec9;p=lorea%2Felgg.git forgot to delete relationship created when tagging with users --- 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); }