summaryrefslogtreecommitdiffstats
path: root/ajax/maps.ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'ajax/maps.ajax.php')
-rw-r--r--ajax/maps.ajax.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/ajax/maps.ajax.php b/ajax/maps.ajax.php
index 25fbbf8..4919fb9 100644
--- a/ajax/maps.ajax.php
+++ b/ajax/maps.ajax.php
@@ -19,6 +19,10 @@ if (isset($_GET['mapid'])) {
$mapID = $tmp[0] * 1;
if (!is_int($mapID)) exit;
$map = getMapObjectByID($mapID);
+ if ($map == null) {
+ header("Status: 404 Not Found");
+ exit;
+ }
sendCacheHeaders();
echo json_encode($map);
exit;
@@ -44,6 +48,7 @@ function getMapObjectByID($mapID) {
$result = mysql_query($sql);
if (mysql_num_rows($result) > 0) {
list($code, $name, $mapExpireTime) = mysql_fetch_row($result);
+ if ($code == '') return null;
$map = new map($code, $mapID);
$map->name = $name;
$map->dateExpires = strtotime($mapExpireTime);