-// Next cached table is the referral system (themes)...
-if (($cacheInstance->cache_file("themes", true) == true) && ($cacheInstance->ext_version_matches("theme"))) {
- // Load referral system from cache
- global $cacheArray;
- $cache = $cacheInstance->cache_load();
+// 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 (themes)...
+if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
+ // Load referal system from cache
+ $cache = $GLOBALS['cache_instance']->getArrayFromCache();