Browse Source
fix(NavigationManager): Make entry order always an integer
Signed-off-by: provokateurin <kate@provokateurin.de>
pull/45455/head
provokateurin
1 year ago
Failed to extract signature
3 changed files with
4 additions and
11 deletions
-
core/ResponseDefinitions.php
-
core/openapi.json
-
lib/private/NavigationManager.php
|
|
@ -26,7 +26,7 @@ namespace OCA\Core; |
|
|
|
* |
|
|
|
* @psalm-type CoreNavigationEntry = array{ |
|
|
|
* id: string, |
|
|
|
* order: int|string, |
|
|
|
* order: int, |
|
|
|
* href: string, |
|
|
|
* icon: string, |
|
|
|
* type: string, |
|
|
|
|
|
@ -232,15 +232,8 @@ |
|
|
|
"type": "string" |
|
|
|
}, |
|
|
|
"order": { |
|
|
|
"oneOf": [ |
|
|
|
{ |
|
|
|
"type": "integer", |
|
|
|
"format": "int64" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "string" |
|
|
|
} |
|
|
|
] |
|
|
|
"type": "integer", |
|
|
|
"format": "int64" |
|
|
|
}, |
|
|
|
"href": { |
|
|
|
"type": "string" |
|
|
|
|
|
@ -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; |
|
|
|