diff options
author | Joas Schilling <coding@schilljs.com> | 2022-10-13 13:29:41 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-10-13 13:29:41 +0300 |
commit | f44ce12e0d5ec5169614ce1ece2c09c8ea03f17b (patch) | |
tree | aa2bbecc2efcc15ee277e11c3bc25db7165d59db | |
parent | 58c7786cf7892e429fc98016edd0216b733ff0d3 (diff) |
Fix sorting stacksbugfix/noid/fix-sorting-stacks
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/Service/StackService.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Service/StackService.php b/lib/Service/StackService.php index d15544a1..1e8bfc56 100644 --- a/lib/Service/StackService.php +++ b/lib/Service/StackService.php @@ -352,6 +352,7 @@ class StackService { $this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_MANAGE); $stackToSort = $this->stackMapper->find($id); $stacks = $this->stackMapper->findAll($stackToSort->getBoardId()); + usort($stacks, static fn (Stack $stackA, Stack $stackB) => $stackA->getOrder() - $stackB->getOrder()); $result = []; $i = 0; foreach ($stacks as $stack) { |