From 628c2e712e39fe85762583fd1ddc12609746fc58 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Tue, 31 Jul 2012 22:23:55 -0700 Subject: Bug regarding having no speed cookies for speed options. --- includes/maps.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'includes') diff --git a/includes/maps.php b/includes/maps.php index 16aa35c..1f2363a 100644 --- a/includes/maps.php +++ b/includes/maps.php @@ -108,6 +108,7 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $jsonmap = str_replace("'", "\'", json_encode($mapdata)); + //!! This should move to header.php //This works in chrome, not sure about others. $preloaddiv = "
@@ -135,13 +136,13 @@ function DisplayMap($mapMatrix, $idprefix = 1, $style = 'normal', $speed = NULL) $maptable "; - + $speedOption['Slow'] = 1; + $speedOption['Med'] = 2; + $speedOption['Fast'] = 3; + $speedOption['Ultra'] = 4; + if (isset($_COOKIE['pref_speed'])) { $prefSpeed = $_COOKIE['pref_speed']; - $speedOption['Slow'] = 1; - $speedOption['Med'] = 2; - $speedOption['Fast'] = 3; - $speedOption['Ultra'] = 4; if (!in_array($prefSpeed, $speedOption)) $prefSpeed = '2'; } else -- cgit v1.2.3