From 145deaeea59e339ea43b2a504d0d3ad37f84b974 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 2 Jan 2024 20:05:28 +0000 Subject: [PATCH] [system] fix sorting for system nav links, fixes #986 --- ext/system/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/system/main.php b/ext/system/main.php index f33a7a120..4bd36dd51 100644 --- a/ext/system/main.php +++ b/ext/system/main.php @@ -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());