From 9a53ddf57cdbf557b0d4f21d0fdf01b4b92569c4 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 30 Aug 2011 20:52:12 -0700 Subject: Fixes #3543. Ported access collections fix to master. --- actions/friends/collections/edit.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'actions/friends/collections/edit.php') 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 -- cgit v1.2.3