-// Check wether stats are enabled
-function ifStatsAreEnabled () {
- logDebugMessage(__FUNCTION__, __LINE__, 'CALLED!');
-
- // Do we have cache?
- if (!isset($GLOBALS['stats_enabled'])) {
- // Then determine it
- $GLOBALS['stats_enabled'] = (getConfig('stats_enabled') == 'Y');
+ // Count db/cache hits in database
+ updateConfiguration(
+ array(
+ 'db_hits',
+ 'cache_hits'
+ ), array(
+ getStatsEntry('db_hits'),
+ getStatsEntry('cache_hits')
+ ),
+ '+'
+ );