delete.php 405 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * River item delete action
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. $id = get_input('id', false);
  9. if ($id !== false && elgg_is_admin_logged_in()) {
  10. if (elgg_delete_river(array('id' => $id))) {
  11. system_message(elgg_echo('river:delete:success'));
  12. } else {
  13. register_error(elgg_echo('river:delete:fail'));
  14. }
  15. } else {
  16. register_error(elgg_echo('river:delete:fail'));
  17. }
  18. forward(REFERER);