// Is the cache extension itself there?
if (EXT_IS_ACTIVE("cache")) {
// Check for cache when extension is already installed
- if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
} // END - if
// Update notes (these will be set as task text!)
default: // Do stuff when extension is loaded
// Create instance on class
- if ($cacheMode != "init") {
- // Make cacheInstance global
- global $cacheInstance;
-
+ if ($GLOBALS['cacheMode'] != "init") {
// Initialize cache system only when it's needed
- $cacheInstance = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
- if ($cacheInstance->getStatus() != "done") {
+ $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), constant('PATH')."inc/".getConfig('cache_path'), getConfig('cache_tested'));
+ if ($GLOBALS['cache_instance']->getStatus() != "done") {
// Failed to initialize cache sustem
addFatalMessage(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_INITIALIZE);
} // END - if