From 66274c83f10f931797763ec93fe212e1ac9e58c7 Mon Sep 17 00:00:00 2001 From: Exodus4D Date: Fri, 6 Jan 2017 21:08:46 +0100 Subject: [PATCH] - added "CACHE" config var to /setup page - fixed map tracing --- app/main/controller/api/map.php | 13 +++++++------ public/templates/view/setup.html | 8 +++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/main/controller/api/map.php b/app/main/controller/api/map.php index 549dec20..f52c3807 100644 --- a/app/main/controller/api/map.php +++ b/app/main/controller/api/map.php @@ -878,8 +878,8 @@ class Map extends Controller\AccessController { */ protected function updateMapData(Model\CharacterModel $character, Model\MapModel $map){ - // update "map data" cache in case of map (system/connection) changes - $clearMapDataCache = false; + // map changed. update cache (system/connection) changed + $mapDataChanged = false; if( ( $mapScope = $map->getScope() ) && @@ -1013,7 +1013,7 @@ class Map extends Controller\AccessController { if($sourceSystem){ $map = $sourceSystem->mapId; $sourceExists = true; - $clearMapDataCache = true; + $mapDataChanged = true; // increase system position (prevent overlapping) $systemPosX = $sourceSystem->posX + $systemOffsetX; $systemPosY = $sourceSystem->posY + $systemOffsetY; @@ -1030,7 +1030,7 @@ class Map extends Controller\AccessController { // get updated maps object if($targetSystem){ $map = $targetSystem->mapId; - $clearMapDataCache = true; + $mapDataChanged = true; $targetExists = true; } } @@ -1049,14 +1049,15 @@ class Map extends Controller\AccessController { // get updated maps object if($connection){ $map = $connection->mapId; - $clearMapDataCache = true; + $mapDataChanged = true; } } } } - if($clearMapDataCache){ + if($mapDataChanged){ $this->clearMapDataCache($character); + $this->broadcastMapData($map); } return $map; diff --git a/public/templates/view/setup.html b/public/templates/view/setup.html index 31f70509..45c3d8ca 100644 --- a/public/templates/view/setup.html +++ b/public/templates/view/setup.html @@ -182,7 +182,7 @@ - + @@ -190,6 +190,12 @@ + + + +
TEMP (Cache)TEMP {{ @TEMP }}
CACHE + {{ @CACHE }} +
LOGS