X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fstats-functions.php;h=c3f607114228cf869f5afaeb84391cfa5327a5b5;hb=d6bbcf951f45052d6888da6ec83a02eb215058df;hp=44256ff3dbb444876695c733154cf16ad56e0cfc;hpb=3e2db2082694ee086a26408080dd9eee5f39b81a;p=mailer.git diff --git a/inc/stats-functions.php b/inc/stats-functions.php index 44256ff3db..c3f6071142 100644 --- a/inc/stats-functions.php +++ b/inc/stats-functions.php @@ -1,7 +1,7 @@ $value) { + foreach ($GLOBALS['stats'] as $entry => $value) { $sql .= sprintf("('%s', %s),", $entry, bigintval($value)); } // END - foreach @@ -173,9 +177,21 @@ function writeStatsTable () { // Filter for flushing statistics function FILTER_FLUSH_STATS () { // Now do we have stats? - if ((isset($GLOBALS['stats'])) && (getConfig('STATS_ENABLED') == 'Y')) { + if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifInternalStatsEnabled())) { // Write statistics to temporary table writeStatsTable(); + + // Count db/cache hits in database + updateConfiguration( + array( + 'db_hits', + 'cache_hits' + ), array( + getStatsEntry('db_hits'), + getStatsEntry('cache_hits') + ), + '+' + ); } // END - if }