commit 457e21bf03098a77b854b5acd81e377d99ddcb0a
parent 7311b8c230ff20e5ad38f27043bc3459a59bc8cf
Author: Jan Dankert <develop@jandankert.de>
Date: Thu, 4 Mar 2021 01:15:06 +0100
Fix: Calculate correct parent groups of group.
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/cms/model/User.class.php b/modules/cms/model/User.class.php
@@ -776,7 +776,7 @@ SQL
foreach( $groupIds as $id ) {
$group = new Group( $id );
$group->load();
- $effectiveGroupIds = array_merge( $group->getParentGroups() );
+ $effectiveGroupIds = array_merge( $effectiveGroupIds,$group->getParentGroups() );
}
$effectiveGroupIds = array_unique( $effectiveGroupIds );
diff --git a/modules/util/Tree.class.php b/modules/util/Tree.class.php
@@ -300,13 +300,13 @@ class Tree
foreach ($g->getChildrenIds() as $id) {
$treeElement = new TreeElement();
- $g = new Group($id);
- $g->load();
+ $subGroup = new Group($id);
+ $subGroup->load();
$treeElement->id = $id;
$treeElement->internalId = $id;
- $treeElement->text = $g->name;
+ $treeElement->text = $subGroup->name;
$treeElement->icon = 'group';
- $treeElement->description = L::lang('GROUP') . ' ' . $g->name . ': ' . implode(', ', $g->getUsers());
+ $treeElement->description = L::lang('GROUP') . ' ' . $subGroup->name . ': ' . implode(', ', $subGroup->getUsers());
$treeElement->type = 'userofgroup';
$treeElement->action = 'group';