[system] fix sorting for system nav links, fixes #986

This commit is contained in:
Shish 2024-01-02 20:05:28 +00:00
parent 015950c30c
commit 145deaeea5

View file

@ -12,7 +12,7 @@ class System extends Extension
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());