/** * Fetch module active information at one shot, but return all the information fetched. */ function vtlib_prefetchModuleActiveInfo($force = true) { global $__cache_module_activeinfo; // Look up if cache has information $tabrows = VTCacheUtils::lookupAllTabsInfo(); // Initialize from DB if cache information is not available or force flag is set if ($tabrows === false || $force) { global $adb; $tabres = $adb->query("SELECT * FROM vtiger_tab"); $tabrows = array(); if ($tabres) { while ($tabresrow = $adb->fetch_array($tabres)) { $tabrows[] = $tabresrow; $__cache_module_activeinfo[$tabresrow['name']] = $tabresrow['presence']; } // Update cache for further re-use VTCacheUtils::updateAllTabsInfo($tabrows); } } return $tabrows; }