Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster/statistics.php
diff options
context:
space:
mode:
Diffstat (limited to 'buildmaster/statistics.php')
-rw-r--r--buildmaster/statistics.php30
1 files changed, 12 insertions, 18 deletions
diff --git a/buildmaster/statistics.php b/buildmaster/statistics.php
index 05d06c6..7d706c6 100644
--- a/buildmaster/statistics.php
+++ b/buildmaster/statistics.php
@@ -2,29 +2,23 @@
require_once "../init.php";
require_once BASE . "/lib/mysql.php";
-if (array_key_exists("from",$_GET))
+if (array_key_exists("from", $_GET))
$min_time="from_base64(\"" . base64_encode("-".$_GET["from"]) . "\")";
else
$min_time="\"-7 00:00:00\"";
-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="";
- $joiner=" JOIN `architectures` ON `statistics`.`architecture`=`architectures`.`id`";
+if (array_key_exists("arch", $_GET)) {
+ $arch_filter = arch_filter_query("architectures");
+ $combiner_left = "";
+ $combiner_right = "";
+ $grouper = "";
+ $joiner = " JOIN `architectures` ON `statistics`.`architecture`=`architectures`.`id`";
} else {
- $arch_filter="1";
- $combiner_left="SUM(";
- $combiner_right=")";
- $grouper=" GROUP BY `statistics`.`date`";
- $joiner="";
+ $arch_filter = "1";
+ $combiner_left = "SUM(";
+ $combiner_right = ")";
+ $grouper = " GROUP BY `statistics`.`date`";
+ $joiner = "";
};
$column_list = array(