delete.php 538 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Elgg friends: delete collection action
  4. *
  5. * @package Elgg.Core
  6. * @subpackage Friends.Collections
  7. */
  8. $collection_id = (int) get_input('collection');
  9. // check the ACL exists and we can edit
  10. if (!can_edit_access_collection($collection_id)) {
  11. register_error(elgg_echo("friends:collectiondeletefailed"));
  12. forward(REFERER);
  13. }
  14. if (delete_access_collection($collection_id)) {
  15. system_message(elgg_echo("friends:collectiondeleted"));
  16. } else {
  17. register_error(elgg_echo("friends:collectiondeletefailed"));
  18. }
  19. forward(REFERER);