aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/collections/edit.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-07-03 17:41:20 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-07-03 17:41:20 -0400
commitde111da23258cd2b513c8f4ab84712ee50272b23 (patch)
treea431dfa846987f48fb480e95bc5c5a1653c8c87c /actions/friends/collections/edit.php
parentb3bad6fc928cae56bdc3a97fe8089b27f6f79f0b (diff)
downloadelgg-de111da23258cd2b513c8f4ab84712ee50272b23.tar.gz
elgg-de111da23258cd2b513c8f4ab84712ee50272b23.tar.bz2
Merged ACL fixes from 1.7 branch.
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