From 1c3eb159945e8f4c0f9006498c93cdcc19724cb9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 27 Mar 2019 11:46:35 +0100 Subject: buildmaster/statistics.php: arch_filter_query() separated into lib/mysel.php --- lib/mysql.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/mysql.php') diff --git a/lib/mysql.php b/lib/mysql.php index 2193ab1..ca683d8 100644 --- a/lib/mysql.php +++ b/lib/mysql.php @@ -87,3 +87,14 @@ function mysql_query_package_version($table) { ")" . ")"; } + +function arch_filter_query($table) { + $arch_filter="`" . $table . "`.`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 .= ")"; + return $arch_filter; +} -- cgit v1.2.3-70-g09d2