aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/collections/delete.php
blob: ff8f1fb55ef2c6efa4e15581e25a50aacc553040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * Elgg friends: delete collection action
 *
 * @package Elgg.Core
 * @subpackage Friends.Collections
 */

$collection_id = (int) get_input('collection');

// check the ACL exists and we can edit
if (!can_edit_access_collection($collection_id)) {
	register_error(elgg_echo("friends:collectiondeletefailed"));
	forward(REFERER);
}

if (delete_access_collection($collection_id)) {
	system_message(elgg_echo("friends:collectiondeleted"));
} else {
	register_error(elgg_echo("friends:collectiondeletefailed"));
}

forward(REFERER);