aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-03-12 11:31:17 -0400
committercash <cash.costello@gmail.com>2013-03-12 11:31:17 -0400
commitfafcbec36266a0542efd4d606d96489cf6fd8270 (patch)
tree9fd5fbaf833791245bf4d5195dd765c1aafd3e10 /mod
parent42c52d51ea0e9047134441b31c8a9c7eac7922ef (diff)
downloadelgg-fafcbec36266a0542efd4d606d96489cf6fd8270.tar.gz
elgg-fafcbec36266a0542efd4d606d96489cf6fd8270.tar.bz2
Fixes #4953 added where clause to only change the correct acl
Diffstat (limited to 'mod')
-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);
}
}