From f55c1f5456cd02b8e6d8370a0e4adb31c3d1c931 Mon Sep 17 00:00:00 2001 From: Blastframe Date: Sun, 3 Nov 2024 20:29:26 -0600 Subject: [PATCH] Fix #15: Sort builds by major version, then by time in ascending order This change modifies the sorting order of builds to prioritize major versions first and then sorts them by time in ascending order. This adjustment improves the organization of builds on the page, specifically archived builds, making it easier to navigate through versions chronologically. --- source/BuildsRenderer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/BuildsRenderer.php b/source/BuildsRenderer.php index 7aa7a80..298add0 100644 --- a/source/BuildsRenderer.php +++ b/source/BuildsRenderer.php @@ -79,10 +79,10 @@ class BuildsRenderer { return 1; } - // Then sort by time descending. - if ($a->file_mtime > $b->file_mtime) { + // Then sort by time ascending. + if ($a->file_mtime < $b->file_mtime) { return -1; - } else if ($a->file_mtime < $b->file_mtime) { + } else if ($a->file_mtime > $b->file_mtime) { return 1; } -- 2.30.2