diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-13 22:35:35 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-13 22:35:35 -0400 |
commit | e790d7ec5d74c5a2279d6bd73e2508eb18209da9 (patch) | |
tree | 38ed43f391038d641372e8887bcc9b68b9e55a15 /actions/photos | |
parent | f611a0505343629bb3c353647334f039bbed48af (diff) | |
parent | 0ec5f4f4f8d9011e460d17156ddf20d96483600d (diff) | |
download | elgg-e790d7ec5d74c5a2279d6bd73e2508eb18209da9.tar.gz elgg-e790d7ec5d74c5a2279d6bd73e2508eb18209da9.tar.bz2 |
Added deleting photo tags
Diffstat (limited to 'actions/photos')
-rw-r--r-- | actions/photos/image/untag.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/actions/photos/image/untag.php b/actions/photos/image/untag.php new file mode 100644 index 000000000..012f98930 --- /dev/null +++ b/actions/photos/image/untag.php @@ -0,0 +1,24 @@ +<?php +/** + * Remove photo tag action + */ + +$annotation = get_annotation(get_input('annotation_id')); + +if (!$annotation instanceof ElggAnnotation || $annotation->name != 'phototag') { + register_error(elgg_echo("tidypics:phototagging:delete:error")); + forward(REFERER); +} + +if (!$annotation->canEdit()) { + register_error(elgg_echo("tidypics:phototagging:delete:error")); + forward(REFERER); +} + +if ($annotation->delete()) { + system_message(elgg_echo("tidypics:phototagging:delete:success")); +} else { + system_message(elgg_echo("tidypics:phototagging:delete:error")); +} + +forward(REFERER); |