Skip to content

Commit

Permalink
[system] fix sorting for system nav links, fixes #986
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Jan 2, 2024
1 parent 015950c commit 145deae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/system/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function onPageRequest(PageRequestEvent $event)

if ($event->page_matches("system")) {
$e = send_event(new PageSubNavBuildingEvent("system"));
usort($e->links, "Shimmie2\sort_nav_links");
usort($e->links, fn (NavLink $a, NavLink $b) => $a->order - $b->order);
$link = $e->links[0]->link;

$page->set_redirect($link->make_link());
Expand Down

0 comments on commit 145deae

Please sign in to comment.