-}
-
-// Close file
-$cacheInstance->cache_close();
-
-// Next cached table is the referral system (admins_acls)...
-if (GET_EXT_VERSION("admins") >= "0.3") {
- // Check for cache file
- if ($cacheInstance->cache_file("admins_acls", true) == true) {
- // Load referral system from cache
- global $cacheArray;
- $cacheArray['admin_acls'] = $cacheInstance->cache_load();
-
- // Valid cache file
- $CNT = 0;
- foreach ($cacheArray['admin_acls'] as $k => $array) {
- $CNT += count($array);
- }
-
- // When there is a period (.) in the result this test will fail and so the cache file is
- // damaged/corrupted
- if (count($cacheArray['admin_acls']) > 0) {
- $TEST = "failed";
- if (count($cacheArray['admin_acls']) > 0 ) $TEST = ($CNT / (count($cacheArray['admin_acls'])));
- if ($TEST != bigintval($TEST)) {
- // Cache file is corrupted!
- $cacheInstance->cache_destroy();
- unset($cacheArray['admin_acls']);
- }
- }
- } elseif (($_CONFIG['cache_acls'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
- // Create cache file here
- $cacheInstance->cache_init("ADMINS_ACLS");
-
- // Load all modules and their data
- $result = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__);
- while ($DATA = SQL_FETCHARRAY($result)) {
- // Add row to cache file
- $cacheInstance->add_row($DATA);
- }
-
- // Free memory
- SQL_FREERESULT($result);
- }