aboutsummaryrefslogtreecommitdiff
path: root/actions/deletetag.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-18 00:57:27 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-18 00:57:27 +0000
commit6061b39ac74181e00b58bdede9095502e9e6bec9 (patch)
treeee8c729f4515f5f8f76a6b2d4b3e69752d298ca9 /actions/deletetag.php
parent17854bb2fece61401f9d4c8d5dc31f396e0fbf70 (diff)
downloadelgg-6061b39ac74181e00b58bdede9095502e9e6bec9.tar.gz
elgg-6061b39ac74181e00b58bdede9095502e9e6bec9.tar.bz2
forgot to delete relationship created when tagging with users
Diffstat (limited to 'actions/deletetag.php')
-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);
}