Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(NavigationManager): Make entry order always an integer
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed May 30, 2024
commit 0a7fcde9069ff05cffe22e2ad6831d866103d12c
2 changes: 1 addition & 1 deletion core/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @psalm-type CoreNavigationEntry = array{
* id: string,
* order: int|string,
* order: int,
* href: string,
* icon: string,
* type: string,
Expand Down
11 changes: 2 additions & 9 deletions core/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,8 @@
"type": "string"
},
"order": {
"oneOf": [
{
"type": "integer",
"format": "int64"
},
{
"type": "string"
}
]
"type": "integer",
"format": "int64"
},
"href": {
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion lib/private/NavigationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function add($entry) {
// 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;
Expand Down