aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/actions/groups/edit.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php
index 632a6412b..c924ef198 100644
--- a/mod/groups/actions/groups/edit.php
+++ b/mod/groups/actions/groups/edit.php
@@ -54,14 +54,15 @@ if ($group_guid && !$group->canEdit()) {
// Assume we can edit or this is a new group
if (sizeof($input) > 0) {
foreach($input as $shortname => $value) {
- // update access collection name ig group name changes
+ // update access collection name if group name changes
if (!$is_new_group && $shortname == 'name' && $value != $group->name) {
- $ac_name = elgg_echo('groups:group') . ": " . $group->name;
+ $ac_name = elgg_echo('groups:group') . ": " . $value;
$acl = get_access_collection($group->group_acl);
if ($acl) {
// @todo Elgg api does not support updating access collection name
$db_prefix = elgg_get_config('dbprefix');
- $query = "UPDATE {$db_prefix}access_collections SET name = '$ac_name'";
+ $query = "UPDATE {$db_prefix}access_collections SET name = '$ac_name'
+ WHERE id = $group->group_acl";
update_data($query);
}
}