]> 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)
committerprovokateurin <kate@provokateurin.de>
Thu, 30 May 2024 15:00:32 +0000 (17:00 +0200)
Signed-off-by: provokateurin <kate@provokateurin.de>
core/ResponseDefinitions.php
core/openapi.json
lib/private/NavigationManager.php

index f186f52c335727b54fe52653398b98623b3dba91..af16545c26793dc00515289be620510274cdcc64 100644 (file)
@@ -26,7 +26,7 @@ namespace OCA\Core;
  *
  * @psalm-type CoreNavigationEntry = array{
  *     id: string,
- *     order: int|string,
+ *     order: int,
  *     href: string,
  *     icon: string,
  *     type: string,
index a20691046fa7ace15c753524c4ca04d61359fc6b..0cfb9cb5a4693c79790e03d631ee3d395820d92b 100644 (file)
                         "type": "string"
                     },
                     "order": {
-                        "oneOf": [
-                            {
-                                "type": "integer",
-                                "format": "int64"
-                            },
-                            {
-                                "type": "string"
-                            }
-                        ]
+                        "type": "integer",
+                        "format": "int64"
                     },
                     "href": {
                         "type": "string"
index 05a3a9c85fed39e8012d436554f65e63398b325e..5d71c83e77a3c48bd6671bb466810aacc5536827 100644 (file)
@@ -95,7 +95,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;