Index: branches/5.2.x/core/kernel/utility/cache.php =================================================================== diff -u -N -r14092 -r14095 --- branches/5.2.x/core/kernel/utility/cache.php (.../cache.php) (revision 14092) +++ branches/5.2.x/core/kernel/utility/cache.php (.../cache.php) (revision 14095) @@ -1,6 +1,6 @@ siteKeyName = 'site_serial:' . crc32(SQL_TYPE . '://' . SQL_USER . ':' . SQL_PASS . '@' . SQL_SERVER . ':' . TABLE_PREFIX); // get cache handler class to use - if (array_key_exists('CacheHandler', $GLOBALS['vars']) && $GLOBALS['vars']['CacheHandler']) { + if ( isset($vars['CacheHandler']) ) { // for advanced users, who want to save one SQL on each page load - $handler_class = $GLOBALS['vars']['CacheHandler'] . 'CacheHandler'; + $handler_class = $vars['CacheHandler'] . 'CacheHandler'; } else { $handler_class = $this->Application->ConfigValue('CacheHandler') . 'CacheHandler'; @@ -313,7 +319,7 @@ { $cache_size = $this->getStorageSize(); - $this->Application->Debugger->appendHTML('Cache Size: ' . formatSize($cache_size) . ' (' . $cache_size . ')'); + $this->Application->Debugger->appendHTML('Cache Size: ' . kUtil::formatSize($cache_size) . ' (' . $cache_size . ')'); foreach ($this->statistics as $cache_name => $cache_data) { foreach ($cache_data as $key => $value) { @@ -324,7 +330,7 @@ } } - print_pre($this->statistics, 'Cache Statistics:'); + kUtil::print_r($this->statistics, 'Cache Statistics:'); } } @@ -400,9 +406,11 @@ function MemcacheCacheHandler() { - if (array_key_exists('MemcacheServers', $GLOBALS['vars'])) { + $vars = kUtil::getConfigVars(); + + if ( array_key_exists('MemcacheServers', $vars) ) { // for advanced users, who want to save one SQL on each page load - $memcached_servers = $GLOBALS['vars']['MemcacheServers']; + $memcached_servers = $vars['MemcacheServers']; } else { $application =& kApplication::Instance();