blob: 012f9893064d579ed47c6f0158734797ca267e88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
|