From d1bafc4ef090279515e2c981627d7842f708e937 Mon Sep 17 00:00:00 2001 From: Ani Date: Mon, 30 Sep 2024 20:15:03 +0100 Subject: [PATCH] Build: Do not return broken builds on platform-specific get_version() --- objects/Build.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/objects/Build.php b/objects/Build.php index 497a484..defa0b9 100644 --- a/objects/Build.php +++ b/objects/Build.php @@ -340,9 +340,10 @@ public static function get_latest(?string $platform) : ?Build else { $s_platform = mysqli_real_escape_string($db, $platform); - + $query = mysqli_query($db, "SELECT * FROM `builds` WHERE `filename_{$s_platform}` IS NOT NULL + AND (`broken` IS NULL OR `broken` != 1) ORDER BY `merge_datetime` DESC LIMIT 1;"); }