diff options
author | cash <cash.costello@gmail.com> | 2011-12-31 11:13:01 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-31 11:13:01 -0500 |
commit | 63dfdab76fef0e44fac550b0bb1a15780470f6c6 (patch) | |
tree | 3f595cca8428386210d891f29b595fa58a313970 /mod/groups/actions | |
parent | 80c2e13287612e52c046063a5b3d5e5bd4c8b532 (diff) | |
download | elgg-63dfdab76fef0e44fac550b0bb1a15780470f6c6.tar.gz elgg-63dfdab76fef0e44fac550b0bb1a15780470f6c6.tar.bz2 |
Fixes #4152 setting access on group creation river item
Diffstat (limited to 'mod/groups/actions')
-rw-r--r-- | mod/groups/actions/groups/edit.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php index c4cf6667e..b513a6098 100644 --- a/mod/groups/actions/groups/edit.php +++ b/mod/groups/actions/groups/edit.php @@ -89,14 +89,10 @@ if ($new_group_flag) { $group->save(); -// group creator needs to be member of new group and river entry created -if ($new_group_flag) { - elgg_set_page_owner_guid($group->guid); - $group->join($user); - add_to_river('river/group/create', 'create', $user->guid, $group->guid); -} - // Invisible group support +// @todo this requires save to be called to create the acl for the group. This +// is an odd requirement and should be removed. Either the acl creation happens +// in the action or the visibility moves to a plugin hook if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') { $visibility = (int)get_input('vis', '', false); if ($visibility != ACCESS_PUBLIC && $visibility != ACCESS_LOGGED_IN) { @@ -105,10 +101,18 @@ if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') { if ($group->access_id != $visibility) { $group->access_id = $visibility; - $group->save(); } } +$group->save(); + +// group creator needs to be member of new group and river entry created +if ($new_group_flag) { + elgg_set_page_owner_guid($group->guid); + $group->join($user); + add_to_river('river/group/create', 'create', $user->guid, $group->guid, $group->access_id); +} + // Now see if we have a file icon if ((isset($_FILES['icon'])) && (substr_count($_FILES['icon']['type'],'image/'))) { |