index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-01-23 09:48:33 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-23 09:48:33 +0100 |
commit | c9c761f526a377988dd90f7e6339b5e9f4b43a14 (patch) | |
tree | 266c0000e715eabdfc2dff4d22e0732e59d53d51 /buildmaster/index.php | |
parent | 4589bd2f34ea4ea3519be6c8d49e01556e3ee058 (diff) |
-rw-r--r-- | buildmaster/index.php | 50 |
diff --git a/buildmaster/index.php b/buildmaster/index.php index 47e1e1c..0ea0376 100644 --- a/buildmaster/index.php +++ b/buildmaster/index.php @@ -2,36 +2,38 @@ require_once "../init.php"; require_once BASE . "/lib/mysql.php"; -if (!array_key_exists("arch",$_GET)) - $_GET["arch"]="i686"; +if (array_key_exists("arch",$_GET)) { + $archs = array(); + foreach (explode("&",$_SERVER["QUERY_STRING"]) as $param) { + if (strpos($param,"arch=")!==0) + continue; + $param = substr($param,5); + if ($param == "") + continue; + $archs[$param] = $param; + } + if (count($archs)==0) { + $archs = array("i486" => "i486", "i686" => "i686", "any" => "any"); + } +} else { + $archs = array("i686" => "i686", "any" => "any"); +} -$arch = $_GET["arch"]; -switch ($arch) { - case "any": - $title = "architecture independent packages"; - break; - case "i486": - $title = "i486"; - break; - case "i686": - $title = "i686"; - break; - default: - $title = "all architectures"; - $arch = ""; +function encode_arch($a) { + return "arch=" . urlencode($a); } -if ($arch != "") { - $sarch_param = "?arch=" . urlencode($arch); - $march_param = "&arch=" . urlencode($arch); -} else { - $sarch_param = ""; - $march_param = ""; + +$sarch_param = implode("&",array_map('encode_arch',$archs)); +$march_param = ""; +if ($sarch_param != "") { + $march_param = "&" . $sarch_param; + $sarch_param = "?" . $sarch_param; } ?> <html> <head> - <title>Buildmaster for Archlinux32 packages (<?php print $title; ?>)</title> + <title>Buildmaster for Archlinux32 packages (<?php print implode(", ",$archs); ?>)</title> </head> <body> <?php show_warning_on_offline_slave(); ?> @@ -58,8 +60,6 @@ if ($arch != "") { <?php foreach (array("any", "i486", "i686", "") as $a) { - if ($arch == $a) - continue; print " <a href=\"?arch=" . $a . "\">"; switch ($a) { case "": |