From 4589bd2f34ea4ea3519be6c8d49e01556e3ee058 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 23 Jan 2019 09:36:33 +0100 Subject: buildmaster/statistics.php: accept multiple archs --- buildmaster/statistics.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/buildmaster/statistics.php b/buildmaster/statistics.php index 5378616..4f2398b 100644 --- a/buildmaster/statistics.php +++ b/buildmaster/statistics.php @@ -2,13 +2,19 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; -if (isset($_GET["from"])) +if (array_key_exists("from",$_GET)) $min_time="from_base64(\"" . base64_encode("-".$_GET["from"]) . "\")"; else $min_time="\"-7 00:00:00\""; -if (isset($_GET["arch"])) { - $arch_filter="`architectures`.`name`=from_base64(\"" . base64_encode($_GET["arch"]) . "\")"; +if (array_key_exists("arch",$_GET)) { + $arch_filter="`architectures`.`name` IN (\"\""; + foreach (explode("&",$_SERVER["QUERY_STRING"]) as $param) { + if (strpos($param,"arch=")!==0) + continue; + $arch_filter .= ",from_base64(\"" . base64_encode(substr($param,5)) . "\")"; + } + $arch_filter .= ")"; $combiner_left=""; $combiner_right=""; $grouper=""; -- cgit v1.2.3-70-g09d2