aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/collections/edit.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-08-30 20:52:12 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-08-30 20:52:12 -0700
commit9a53ddf57cdbf557b0d4f21d0fdf01b4b92569c4 (patch)
tree8ef2736c0aa6491ff3fd47d52e78594570e7da71 /actions/friends/collections/edit.php
parente32bfa450e9a07f6f6575b84d18eb63bd72969f4 (diff)
downloadelgg-9a53ddf57cdbf557b0d4f21d0fdf01b4b92569c4.tar.gz
elgg-9a53ddf57cdbf557b0d4f21d0fdf01b4b92569c4.tar.bz2
Fixes #3543. Ported access collections fix to master.
Diffstat (limited to 'actions/friends/collections/edit.php')
-rw-r--r--actions/friends/collections/edit.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/actions/friends/collections/edit.php b/actions/friends/collections/edit.php
index b7fb716f2..9eb5e1eab 100644
--- a/actions/friends/collections/edit.php
+++ b/actions/friends/collections/edit.php
@@ -9,7 +9,15 @@
$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