Getting "fake" cache size from getInfos.

Displaying infos in maintenance page
This commit is contained in:
MatthieuLP
2021-03-12 12:04:29 +01:00
committed by plegall
parent 49aaeeaf51
commit 6fbb6a22fc
4 changed files with 77 additions and 5 deletions
+4 -1
View File
@@ -142,6 +142,10 @@ function ws_getInfos($params, &$service)
$query = 'SELECT COUNT(*) FROM '.CATEGORIES_TABLE.';';
list($infos['nb_categories']) = pwg_db_fetch_row(pwg_query($query));
// Cache size
// TODO for real later
$infos['cache_size'] = 4242;
$query = 'SELECT COUNT(*) FROM '.CATEGORIES_TABLE.' WHERE dir IS NULL;';
list($infos['nb_virtual']) = pwg_db_fetch_row(pwg_query($query));
@@ -187,7 +191,6 @@ function ws_getInfos($params, &$service)
'value' => $value,
);
}
return array('infos' => new PwgNamedArray($output, 'item'));
}