delete.php 398 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * Elgg Message board: delete message action
  4. *
  5. * @package ElggMessageBoard
  6. */
  7. $annotation_id = (int) get_input('annotation_id');
  8. $message = elgg_get_annotation_from_id($annotation_id);
  9. if ($message && $message->canEdit() && $message->delete()) {
  10. system_message(elgg_echo("messageboard:deleted"));
  11. } else {
  12. system_message(elgg_echo("messageboard:notdeleted"));
  13. }
  14. forward(REFERER);