aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/collections/delete.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/friends/collections/delete.php')
-rw-r--r--actions/friends/collections/delete.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/actions/friends/collections/delete.php b/actions/friends/collections/delete.php
new file mode 100644
index 000000000..ff8f1fb55
--- /dev/null
+++ b/actions/friends/collections/delete.php
@@ -0,0 +1,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);