-// 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();
-} elseif (($_CONFIG['cache_refsys'] == "Y") && ($CSS != "1") && ($CSS != "-1")) {
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
+// 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 (getOutputMode() != 1) {