// 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
// Count cache hits
incrementConfigEntry('cache_hits');
}
- } else {
+ } elseif (!EXT_IS_ACTIVE("cache")) {
// Old version, so load it from database
if (!empty($act)) {
// Main menu