diff options
Diffstat (limited to 'mod/messageboard/actions/delete.php')
-rw-r--r-- | mod/messageboard/actions/delete.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/messageboard/actions/delete.php b/mod/messageboard/actions/delete.php new file mode 100644 index 000000000..a1f62278c --- /dev/null +++ b/mod/messageboard/actions/delete.php @@ -0,0 +1,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); |