From: Roland Häder Date: Wed, 23 Jan 2013 14:36:31 +0000 (+0000) Subject: Fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fb41c3ccea45514b948ee7c482a25670e345be9d;p=mailer.git Fixes --- diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index d8542186cb..1bf81d868b 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -136,18 +136,6 @@ function getAdminNotify () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for internal_stats -function getInternalStats () { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__])) { - // Determine it - $GLOBALS[__FUNCTION__] = getConfig('internal_stats'); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__]; -} - // "Getter" for display_debug_sqls function getDisplayDebugSqls () { // Is there cache? diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index e3f992d0be..a41534abc9 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1650,12 +1650,24 @@ function isWhatTitleEnabled () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for internal_stats +function getInternalStats () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('internal_stats'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Checks whether stats are enabled function ifInternalStatsEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { - // Then determine it - $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.2.6')) && (getInternalStats() == 'Y')); + // Then determine it, do not add isExtensionInstalledAndNewer() here as it breaks very first SQL query + $GLOBALS[__FUNCTION__] = (getInternalStats() == 'Y'); } // END - if // Return cached value