fix typo
这个提交包含在:
父节点
7d53c2935c
当前提交
892aeb12a2
|
@ -130,7 +130,7 @@ class PermissionsHook implements
|
|||
|
||||
// Add Add Log
|
||||
$oldGroups = $this->userGroupManager->getUserGroups($user); // previous groups
|
||||
$newGroups = array_merge($oldGroups, [$added_group]); // all groups
|
||||
$newGroups = array_merge($oldGroups, [$added_group]); // new groups
|
||||
$logEntry = new ManualLogEntry('rights', 'autopromote');
|
||||
$logEntry->setPerformer($user);
|
||||
$logEntry->setTarget($user->getUserPage());
|
||||
|
@ -155,11 +155,7 @@ class PermissionsHook implements
|
|||
|
||||
// Add Remove Log
|
||||
$oldGroups = $this->userGroupManager->getUserGroups($user); // previous groups
|
||||
$newGroups = [...$oldGroups]; // all groups
|
||||
$key = array_search($removed_group, $newGroups);
|
||||
if ($key !== false) {
|
||||
array_splice($newGroups, $key, 1);
|
||||
}
|
||||
$newGroups = array_intersect($oldGroups, [$removed_group]); // new groups
|
||||
if ($oldGroups !== $newGroups) {
|
||||
$logEntry = new ManualLogEntry('rights', 'autopromote');
|
||||
$logEntry->setPerformer($user);
|
||||
|
|
正在加载...
在新工单中引用