edit.php 545 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Friends collection edit action
  4. *
  5. * @package Elgg.Core
  6. * @subpackage Friends.Collections
  7. */
  8. $collection_id = get_input('collection_id');
  9. $friends = get_input('friend');
  10. // check it exists and we can edit
  11. if (!can_edit_access_collection($collection_id)) {
  12. system_message(elgg_echo('friends:collection:edit_failed'));
  13. }
  14. if (update_access_collection($collection_id, $friends)) {
  15. system_message(elgg_echo('friends:collections:edited'));
  16. } else {
  17. system_message(elgg_echo('friends:collection:edit_failed'));
  18. }
  19. forward(REFERER);