Progress towards more reliable build changesets detection

This commit is contained in:
Latif Khalifa
2013-01-22 03:00:46 +01:00
parent 36882eb5e8
commit 7d31e3af5a
20 changed files with 1460 additions and 86 deletions

View File

@@ -8,16 +8,16 @@ header("Content-Type: text/plain");
$chan = "SingularityAlpha";
if (isset($_GET["chan"])) {
$chan = preg_replace("%[^\\w_-]%i", "", $_GET["chan"]);
$chan = preg_replace("%[^\\w_-]%i", "", $_GET["chan"]);
}
$files = glob($chan . "_*.exe");
if (count($files) === 0) {
header("HTTP/1.0 404 Not Found");
header("Content-Type: text/plain");
print "Requested channel was not found";
die();
header("HTTP/1.0 404 Not Found");
header("Content-Type: text/plain");
print "Requested channel was not found";
die();
}
$files = array_reverse($files);
@@ -26,5 +26,14 @@ $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$latest = urlencode($files[0]);
header("Location: http://${host}${uri}/${latest}");
?>
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/