Permalink
Browse files

FIX: Fixed possible empty maps when disabling the header menu via URL…

… / view options
  • Loading branch information...
1 parent ab4c815 commit e4d9e29b140c5125b9eb5dd4bc67338cde4fbbd9 @LarsMichelsen LarsMichelsen committed Feb 2, 2017
Showing with 8 additions and 5 deletions.
  1. +3 −0 ChangeLog
  2. +5 −5 share/server/core/classes/GlobalMapCfg.php
View
@@ -1,4 +1,7 @@
1.9b12
+Frontend:
+ * FIX: Fixed possible empty maps when manually disabling the header menu
+
Core:
* FIX: Fixed NDO/IDO MySQL backend compatibility with ONLY_FULL_GROUP_BY MySQL
mode (Thanks to SteScho)
@@ -420,7 +420,7 @@ public function readMapConfig($onlyGlobal = false, $resolveTemplates = true,
$this->typeDefaults = $this->DCACHE->getCache();
// Now process the information from the sources
- $this->processSources();
+ $this->processSources(true);
// Cache objects are not needed anymore
$this->CACHE = null;
@@ -489,7 +489,7 @@ public function readMapConfig($onlyGlobal = false, $resolveTemplates = true,
if (!$onlyGlobal || $enforceSources) {
// Now process the data from the sources
- $this->processSources();
+ $this->processSources(!$enforceSources);
}
// Cache objects are not needed anymore
@@ -775,7 +775,7 @@ private function paramsToString($params) {
* 3. tell the source processing that the data used in this source has changed and the
* source needs processed again
*/
- private function processSources() {
+ private function processSources($useCache) {
global $_MAINCFG;
$sources = $this->getValue(0, 'sources');
if(!$sources)
@@ -795,7 +795,7 @@ private function processSources() {
$cache_sources = $CACHE->isCached();
$cache_map = $this->CACHE->isCached();
$cache_maincfg = $_MAINCFG->isCached();
- if($cache_sources != -1 && $cache_map != -1 && $cache_maincfg != -1
+ if($useCache && $cache_sources != -1 && $cache_map != -1 && $cache_maincfg != -1
&& $cache_sources >= $cache_maincfg && $cache_sources >= $cache_map
&& !$this->sourcesChanged($cache_sources)) {
// 3a. Use the cache
@@ -823,7 +823,7 @@ private function processSources() {
// Call process filter implicit if not already done
process_filter($this, $this->name, $this->mapConfig);
- if ($cacheable)
+ if ($cacheable && $useCache)
$CACHE->writeCache($this->mapConfig, 1);
// FIXME: Invalidate/remove cache files on changed configurations

0 comments on commit e4d9e29

Please sign in to comment.