Skip to content

Commit

Permalink
chore: small optimization
Browse files Browse the repository at this point in the history
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
2 people authored and backportbot[bot] committed Jul 12, 2024
1 parent 61c0ec2 commit 4361662
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/Controller/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,8 @@ private function buildOCSResponseXML(string $format, DataResponse $data): V1Resp
}

private function folderDataForXML(array $data): array {
$groups = [];

if (isset($data['group_details'])) {
$groups = $data['group_details'];
unset($data['group_details']);
}

$groups = $data['group_details'] ?? [];
unset($data['group_details']);
$data['groups'] = [];
foreach ($groups as $id => $group) {
$data['groups'][] = [
Expand Down

0 comments on commit 4361662

Please sign in to comment.