diff --git a/index.php b/index.php index 73dd923..0a6ad33 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,4 @@ query("select chan, nr as build_nr, version, hash, modified from builds where chan='SingularityAlpha' order by nr desc, chan asc limit 1"); +$row = $DB->fetchRow($res); +$build = new stdClass; + +foreach($row as $key=>$val) { + if (false === filter_var($key, FILTER_VALIDATE_INT)) { + $build->$key = $val; + } +} + +header("Content-Type: application/json"); +print json_encode($build);