case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_cache' OR `what`='cache_stats' LIMIT 2";
// Unregister all filters
UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
// 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