-// Next cached table is the referral system (refdepths)...
-if ($cacheInstance->cache_file("refdepths", true) == true) {
- // Load referral system from cache
- global $cacheArray;
- $cacheArray['ref_depths'] = $cacheInstance->cache_load();
-} elseif (($_CONFIG['cache_refdepth'] == "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 (refdepths)...
+if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+ // Load referal system from cache
+ $GLOBALS['cache_array']['refdepths'] = $GLOBALS['cache_instance']->getArrayFromCache();
+} elseif (getOutputMode() != '1') {