X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fstats-functions.php;h=0305da77eff0856037b529e04c44cb07142ebb34;hp=1e4b5dac22d7634abdd1ca86203bf1db3209ce2f;hb=e9da1508b2a3ccbf63adc999981674740a47e074;hpb=26ea563a90454a2cde58f8cd134542a0d8f14780 diff --git a/inc/stats-functions.php b/inc/stats-functions.php index 1e4b5dac22..0305da77ef 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 // Finalize it and run it - SQL_QUERY(substr($sql, 0, -1), __FUNCTION__, __LINE__); + sqlQuery(substr($sql, 0, -1), __FUNCTION__, __LINE__); } // 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'])) && (!isInstaller()) && (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 }