diff options
Diffstat (limited to 'actions/friends/collections/edit.php')
-rw-r--r-- | actions/friends/collections/edit.php | 14 |
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 |