Password reset for admin login added (still buggy if cache is installed and sql_patch...
[mailer.git] / inc / load_cache.php
index 165bf9cca3c1c180bf1b875690e20a5802994f7a..dea40b937a0b6f28434d9a1d9df1ee443c7d8a92 100644 (file)
@@ -98,7 +98,7 @@ if (($cacheInstance->cache_file("admins", true) == true)) {
                $cacheInstance->cache_destroy();
                unset($cacheArray['admins']);
        }
-} elseif (($_CONFIG['cache_admins'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_admins'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file
        $cacheInstance->cache_init("ADMINS");
 
@@ -159,11 +159,13 @@ if ($cacheInstance->cache_file("mod_reg", true) == true) {
                        unset($cacheArray['modules']['admin_only'][$key]);
                        $cacheArray['modules']['mem_only'][$mod] = $cacheArray['modules']['mem_only'][$key];
                        unset($cacheArray['modules']['mem_only'][$key]);
-                       $cacheArray['modules']['has_menu'][$mod] = $cacheArray['modules']['has_menu'][$key];
-                       unset($cacheArray['modules']['has_menu'][$key]);
+                       if (isset($cacheArray['modules']['has_menu'][$key])) {
+                               $cacheArray['modules']['has_menu'][$mod] = $cacheArray['modules']['has_menu'][$key];
+                               unset($cacheArray['modules']['has_menu'][$key]);
+                       } // END - if
                }
        }
-} elseif (($_CONFIG['cache_modreg'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_modreg'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->cache_init("MODULES");
 
@@ -216,7 +218,7 @@ if ($cacheInstance->cache_file("config", true) == true) {
                $cacheInstance->cache_destroy();
                unset($cacheArray);
        }
-} elseif (($_CONFIG['cache_config'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_config'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->cache_init("CONFIG");
 
@@ -255,7 +257,7 @@ if ($cacheInstance->cache_file("refsystem", true) == true) {
                $cacheInstance->cache_destroy();
                unset($REF_SYSTEM);
        }
-} elseif (($_CONFIG['cache_refsys'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->cache_init("REFSYSTEM");
 
@@ -294,7 +296,7 @@ if ($cacheInstance->cache_file("refdepths", true) == true) {
                $cacheInstance->cache_destroy();
                unset($REF_DEPTHS);
        }
-} elseif (($_CONFIG['cache_refdepth'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+} elseif (($_CONFIG['cache_refdepth'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
        // Create cache file here
        $cacheInstance->cache_init("REFDEPTHS");
 
@@ -337,7 +339,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") {
                                unset($cacheArray['admin_acls']);
                        }
                }
-       } elseif (($_CONFIG['cache_acls'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) {
+       } elseif (($_CONFIG['cache_acls'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
                // Create cache file here
                $cacheInstance->cache_init("ADMINS_ACLS");