fix a counter issue

This commit is contained in:
SJ 2015-05-22 11:37:08 +02:00
parent 842fc6b434
commit b4867d79fe

View File

@ -4,22 +4,7 @@ class ModelStatCounter extends Model {
public function get_counters(){
$counter = array();
$asize = 0;
if(MEMCACHED_ENABLED) {
$memcache = Registry::get('memcache');
$counter = $memcache->get(Registry::get('counters'));
if(isset($counter[MEMCACHED_PREFIX . 'counters_last_update'])) {
if(isset($counter[MEMCACHED_PREFIX . 'size'])) { $asize = $counter[MEMCACHED_PREFIX . 'size']; }
if(isset($counter[MEMCACHED_PREFIX . 'stored_size'])) { $ssize = $counter[MEMCACHED_PREFIX . 'stored_size']; }
unset($counter[MEMCACHED_PREFIX . 'size']);
unset($counter[MEMCACHED_PREFIX . 'stored_size']);
return array ($asize, $ssize, $counter);
}
}
$asize = $ssize = 0;
$query = $this->db->query("SELECT * FROM " . TABLE_COUNTER);