X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fstats-functions.php;h=3190a6d9ab3388885ebb67dfaa2a8fa7d3b28a74;hb=77183894e9b5683166bc00a1735e8897c57ef699;hp=338f3b833adab7d1920438ea6c89e070d8c4b6a3;hpb=8d4176053d397a86baca20b4d7ab7ed526355be8;p=mailer.git diff --git a/inc/stats-functions.php b/inc/stats-functions.php index 338f3b833a..3190a6d9ab 100644 --- a/inc/stats-functions.php +++ b/inc/stats-functions.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // Init stats system function initStatsSystem () { // Is stats cache loaded? - if ((!isset($GLOBALS['stats_loaded'])) && (getConfig('STATS_ENABLED') == 'Y')) { + if ((!isset($GLOBALS['stats_loaded'])) && (ifStatsAreEnabled())) { // Init statistics array $GLOBALS['stats'] = array(); @@ -66,7 +66,7 @@ function isStatsEntrySet ($entry) { // Increments a statistics entry function incrementStatsEntry ($entry, $amount=1) { // Do we have stats enabled? - if (getConfig('STATS_ENABLED') != 'Y') return; + if (!ifStatsAreEnabled()) return; // Is it there? if (isStatsEntrySet($entry)) { @@ -110,8 +110,10 @@ function loadStatsTable () { } // END - if // Load it from database - $result = SQL_QUERY_ESC("SELECT `stats_entry`,`stats_value` FROM `{?_MYSQL_PREFIX?}_stats_%s` ORDER BY `stats_entry` ASC", - array(generateDateTime(time(), '6')), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `stats_entry`, `stats_value` FROM `{?_MYSQL_PREFIX?}_stats_%s` ORDER BY `stats_entry` ASC", + array( + generateDateTime(time(), '6') + ), __FUNCTION__, __LINE__); // Read all rows while ($row = SQL_FETCHARRAY($result)) { @@ -174,7 +176,7 @@ function writeStatsTable () { // Filter for flushing statistics function FILTER_FLUSH_STATS () { // Now do we have stats? - if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (getConfig('STATS_ENABLED') == 'Y')) { + if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifStatsAreEnabled())) { // Write statistics to temporary table writeStatsTable(); } // END - if