Add trip planner, fix weekend routes appearing on weekdays in network 10
[bus.git] / busui / staticmaplite / staticmap.php
blob:a/busui/staticmaplite/staticmap.php -> blob:b/busui/staticmaplite/staticmap.php
--- a/busui/staticmaplite/staticmap.php
+++ b/busui/staticmaplite/staticmap.php
@@ -41,10 +41,10 @@
 	protected $osmLogo = 'images/osm_logo.png';
 
 	protected $useTileCache = true;
-	protected $tileCacheBaseDir = 'cache/tiles';
+	protected $tileCacheBaseDir = './cache/tiles';
 
 	protected $useMapCache = true;
-	protected $mapCacheBaseDir = 'cache/maps';
+	protected $mapCacheBaseDir = './cache/maps';
 	protected $mapCacheID = '';
 	protected $mapCacheFile = '';
 	protected $mapCacheExtension = 'png';
@@ -190,8 +190,7 @@
 
 	
 	public function mkdir_recursive($pathname, $mode){
-		is_dir(dirname($pathname)) || $this->mkdir_recursive(dirname($pathname), $mode);
-		return is_dir($pathname) || @mkdir($pathname, $mode);
+		return mkdir($pathname, $mode, true);
 	}
 	public function writeTileToCache($url, $data){
 		$filename = $this->tileUrlToFilename($url);
@@ -271,3 +270,4 @@
 print $map->showMap();
 
 ?>
+