]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/admins_functions.php
Fixes for admin ACLs
[mailer.git] / inc / libs / admins_functions.php
index 665f2e9bf8e4bfad40bcb5d2562781fe38ae5c72..c0d4c13023df4398210569cb391dad0960c30404 100644 (file)
@@ -71,7 +71,7 @@ function ADMINS_CHECK_ACL($act, $wht) {
 
        // Shall I test for a main or sub menu? (action or what?)
        $acl_mode = "failed";
-       if (GET_EXT_VERSION("cache") >= "0.1.2") {
+       if ((GET_EXT_VERSION("cache") >= "0.1.2") && (count($GLOBALS['cache_array']['admin_acls']) > 0)) {
                // Lookup in cache
                if ((!empty($act)) && (isset($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid])) & ($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid] == $act)) {
                        // Main menu line found
@@ -86,7 +86,7 @@ function ADMINS_CHECK_ACL($act, $wht) {
                        // Count cache hits
                        incrementConfigEntry('cache_hits');
                }
-       } else {
+       } elseif (!EXT_IS_ACTIVE("cache")) {
                // Old version, so load it from database
                if (!empty($act)) {
                        // Main menu