]> git.mxchange.org Git - mailer.git/blobdiff - inc/load_cache.php
Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / load_cache.php
index cdad73540e39b1d1301eba61d418dee402cbe77a..bf4b34326bd954da0ed558dd4af1158d0ce03a4d 100644 (file)
@@ -145,25 +145,26 @@ if ($cacheInstance->cache_file("mod_reg", true) == true) {
                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
@@ -208,6 +209,7 @@ if ($cacheInstance->cache_file("config", true) == true) {
 
        // 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