unset($cacheArray['modules']);
} else {
// Rewrite module cache
- $MOD = $cacheArray['modules'];
- foreach ($cacheArray['modules']['module'] as $key=>$mod) {
- $cacheArray['modules']['id'][$mod] = $cacheArray['modules']['id'][$key];
+ $modArray = $cacheArray['modules'];
+ foreach ($modArray['module'] as $key=>$mod) {
+ $cacheArray['modules']['id'][$mod] = $modArray['id'][$key];
unset($cacheArray['modules']['id'][$key]);
- $cacheArray['modules']['title'][$mod] = $cacheArray['modules']['title'][$key];
+ $cacheArray['modules']['title'][$mod] = $modArray['title'][$key];
unset($cacheArray['modules']['title'][$key]);
- $cacheArray['modules']['locked'][$mod] = $cacheArray['modules']['locked'][$key];
+ $cacheArray['modules']['locked'][$mod] = $modArray['locked'][$key];
unset($cacheArray['modules']['locked'][$key]);
- $cacheArray['modules']['hidden'][$mod] = $cacheArray['modules']['hidden'][$key];
+ $cacheArray['modules']['hidden'][$mod] = $modArray['hidden'][$key];
unset($cacheArray['modules']['hidden'][$key]);
- $cacheArray['modules']['admin_only'][$mod] = $cacheArray['modules']['admin_only'][$key];
+ $cacheArray['modules']['admin_only'][$mod] = $modArray['admin_only'][$key];
unset($cacheArray['modules']['admin_only'][$key]);
- $cacheArray['modules']['mem_only'][$mod] = $cacheArray['modules']['mem_only'][$key];
+ $cacheArray['modules']['mem_only'][$mod] = $modArray['mem_only'][$key];
unset($cacheArray['modules']['mem_only'][$key]);
if (isset($cacheArray['modules']['has_menu'][$key])) {
- $cacheArray['modules']['has_menu'][$mod] = $cacheArray['modules']['has_menu'][$key];
+ $cacheArray['modules']['has_menu'][$mod] = $modArray['has_menu'][$key];
unset($cacheArray['modules']['has_menu'][$key]);
} // END - if
}
+ unset($modArray);
}
} elseif (($_CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
// Create cache file here
// Overwrite the config with the cache version
$cacheArray['config'] = $newCache;
+ unset($newCache);
// When there is a period (.) in the result this test will fail and so the cache file is
// damaged/corrupted