diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-08-30 20:52:12 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-08-30 20:52:12 -0700 |
commit | 9a53ddf57cdbf557b0d4f21d0fdf01b4b92569c4 (patch) | |
tree | 8ef2736c0aa6491ff3fd47d52e78594570e7da71 /actions/friends/collections/edit.php | |
parent | e32bfa450e9a07f6f6575b84d18eb63bd72969f4 (diff) | |
download | elgg-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.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 |