From fb41c3ccea45514b948ee7c482a25670e345be9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 23 Jan 2013 14:36:31 +0000 Subject: [PATCH] Fixes --- inc/libs/other_functions.php | 12 ------------ inc/wrapper-functions.php | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 14 deletions(-) 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 -- 2.39.5