$oros = "";
$orjava = "";
$orcountry = "";
+$orcores = "";
foreach (getallheaders() as $header => $value) {
if (preg_match("/^[a-zA-Z0-9 !$%&()*+,.\\/:=?@_~-]{1,40}$/", $value)) {
$h = strtolower($header);
$orjava = $value;
} else if ($h == 'x-openrocket-country') {
$orcountry = $value;
+ } else if ($h == 'x-openrocket-cpus') {
+ $orcores = $value;
}
}
}
// Log the request
if ((strlen($orversion) > 0 || strlen($orid) > 0 || strlen($oros) > 0
- || strlen($orjava) > 0 || strlen($orcountry) > 0) &&
-
+ || strlen($orjava) > 0 || strlen($orcountry) > 0
+ || strlen($orcores) > 0) &&
(strlen($orversion) < 20 && strlen($orid) < 50 && strlen($oros) < 50
- && strlen($orjava) < 50 && strlen($orcountry) < 50)) {
+ && strlen($orjava) < 50 && strlen($orcountry) < 50)
+ && strlen($orcores) < 10) {
$file = $logfiles . gmdate("Y-m");
$line = gmdate("Y-m-d H:i:s") . ";" . $orid . ";" . $orversion .
- ";" . $oros . ";" . $orjava . ";" . $orcountry . "\n";
+ ";" . $oros . ";" . $orjava . ";" . $orcountry . ";" . $orcores . "\n";
$fp = fopen($file, 'a');
if ($fp != FALSE) {
/*
* Currently all old versions are handled manually.
* Update checking was introduced in OpenRocket 0.9.4
+ *
+ * We ignore "pre" versions, they are handled exacly like
+ * their non-pre counterparts.
*/
$version = $_GET["version"];
$updates = "";
-if (preg_match("/^0\.9\.6/",$version)) {
+if (preg_match("/^1\.1\.0/", $version)) {
+ $updates = "Version: 1.1.1\n" .
+ "6: Enhanced motor selection\n" .
+ "5: Rewritten simulation code" .
+ "4: Bug fixes";
+} else if (preg_match("/^0\.9\.6/", $version)) {
$updates = "Version: 1.0.0\n" .
"6: Hundreds of new thrustcurves\n" .
"5: Bug fixes";
-} else if (preg_match("/^0\.9\.(4|5pre|5|6pre)/",$version)) {
+} else if (preg_match("/^0\.9\.[45]/", $version)) {
$updates = "Version: 1.0.0\n" .
"7: Hundreds of new thrustcurves\n" .
"6: Aerodynamic computation updates\n" .