-// Next cached table is the referral system (refsystem)...
-if ($cacheInstance->cache_file("refsystem", true) == true) {
- // Load referral system from cache
- global $cacheArray;
- $cacheArray['ref_system'] = $cacheInstance->cache_load();
-
- // Valid cache file
- $CNT = 0;
- foreach ($cacheArray['ref_system'] as $k => $array) {
- $CNT += count($array);
- }
-
- // We now ignore empty cache here
-} elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
+// Next cached table is the referal system (refsystem)...
+if (($GLOBALS['cache_instance']->loadCacheFile("refsystem")) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
+ // Load referal system from cache
+ $GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif ((getConfig('cache_refsys') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {