Pre Merge pull request !438 from 顾北辰/develop

pull/438/MERGE
顾北辰 2025-06-26 09:09:03 +00:00 committed by Gitee
commit 65e75b2395
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 10 additions and 0 deletions

View File

@ -44,6 +44,16 @@ class Group extends Backend
$groupList = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0));
} else {
$groups = $this->auth->getGroups();
$count = count($groups);
for ($k = 1; $k < $count; $k++) {
for ($i = 0; $i < $count - $k; $i++) {
if ($groups[$i]['pid'] > $groups[$i + 1]['pid']) {
$tem = $groups[$i];
$groups[$i] = $groups[$i + 1];
$groups[$i + 1] = $tem;
}
}
}
$groupIds = [];
foreach ($groups as $m => $n) {
if (in_array($n['id'], $groupIds) || in_array($n['pid'], $groupIds)) {