mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(NavigationManager): Make entry order always an integer
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
8965b70228
commit
0a7fcde906
3 changed files with 4 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue