]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(NavigationManager): Make entry order always an integer
authorprovokateurin <kate@provokateurin.de>
Thu, 30 May 2024 14:59:04 +0000 (16:59 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 3 Jun 2024 15:12:32 +0000 (15:12 +0000)
Signed-off-by: provokateurin <kate@provokateurin.de>
core/ResponseDefinitions.php
core/openapi.json
lib/private/NavigationManager.php

index 4a79c3ad3ec859a7429e2928a544ef2103da2295..03e62c4c23ffc99cab022754960f37b7459ddf02 100644 (file)
@@ -43,7 +43,7 @@ namespace OCA\Core;
  *
  * @psalm-type CoreNavigationEntry = array{
  *     id: string,
- *     order: int|string,
+ *     order: int,
  *     href: string,
  *     icon: string,
  *     type: string,
index 34009e38472d7df7fa769576c54277b0d7628905..28a95fe4744a52c4038afd6a310013a511189ba8 100644 (file)
                         "type": "string"
                     },
                     "order": {
-                        "oneOf": [
-                            {
-                                "type": "integer",
-                                "format": "int64"
-                            },
-                            {
-                                "type": "string"
-                            }
-                        ]
+                        "type": "integer",
+                        "format": "int64"
                     },
                     "href": {
                         "type": "string"
index 0ce2b3124b29b28e433f74d63909dda1f8ba361e..21d9c6caf0581bd676c59b4c372fbe7e3ae80167 100644 (file)
@@ -119,7 +119,7 @@ class NavigationManager implements INavigationManager {
                        // This is the default app that will always be shown first
                        $entry['default'] = ($entry['app'] ?? false) === $this->defaultApp;
                        // Set order from user defined app order
-                       $entry['order'] = $this->customAppOrder[$id]['order'] ?? $entry['order'] ?? 100;
+                       $entry['order'] = (int)($this->customAppOrder[$id]['order'] ?? $entry['order'] ?? 100);
                }
 
                $this->entries[$id] = $entry;