aboutsummaryrefslogtreecommitdiff
path: root/mod/messageboard/actions/delete.php
blob: a1f62278ca4c2b3c8520b87dcbf4eaf36677b64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
 * Elgg Message board: delete message action
 *
 * @package ElggMessageBoard
 */

$annotation_id = (int) get_input('annotation_id');
$message = elgg_get_annotation_from_id($annotation_id);

if ($message && $message->canEdit() && $message->delete()) {
	system_message(elgg_echo("messageboard:deleted"));
} else {
	system_message(elgg_echo("messageboard:notdeleted"));
}

forward(REFERER);