aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/collections/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/friends/collections/edit.php')
-rw-r--r--actions/friends/collections/edit.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/actions/friends/collections/edit.php b/actions/friends/collections/edit.php
index b7fb716f2..581b21353 100644
--- a/actions/friends/collections/edit.php
+++ b/actions/friends/collections/edit.php
@@ -1,15 +1,23 @@
<?php
/**
- * Friends collection edit action
+ * Elgg collection add page
*
- * @package Elgg.Core
- * @subpackage Friends.Collections
+ * @package Elgg
+ * @subpackage Core
*/
$collection_id = get_input('collection_id');
$friends = get_input('friend');
-//chech the collection exists and the current user owners it
-update_access_collection($collection_id, $friends);
+// check it exists and we can edit
+if (!can_edit_access_collection($collection_id)) {
+ system_message(elgg_echo('friends:collection:edit_failed'));
+}
-exit;
+if (update_access_collection($collection_id, $friends)) {
+ system_message(elgg_echo('friends:collections:edited'));
+} else {
+ system_message(elgg_echo('friends:collection:edit_failed'));
+}
+
+forward(REFERER); \ No newline at end of file