blob: 11c433a61570129bc190fad5d781f41984192f21 (
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 = elgg_get_annotation_from_id(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);
|