aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/deletetag.php8
1 files changed, 7 insertions, 1 deletions
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);
}