Even more performance hacks
[mailer.git] / inc / wrapper-functions.php
index 881b7c94e647e020406017684da90dcd372d67f9..c81d9d09d30ff956b334d6c60580579376e254d3 100644 (file)
@@ -277,13 +277,13 @@ function detectServerName () {
 // Check wether we are installing
 function isInstalling () {
        // Determine wether we are installing
-       if (!isset($GLOBALS['mxchange_installing'])) {
+       if (!isset($GLOBALS['mailer_installing'])) {
                // Check URL (css.php/js.php need this)
-               $GLOBALS['mxchange_installing'] = isGetRequestParameterSet('installing');
+               $GLOBALS['mailer_installing'] = isGetRequestParameterSet('installing');
        } // END - if
 
        // Return result
-       return $GLOBALS['mxchange_installing'];
+       return $GLOBALS['mailer_installing'];
 }
 
 // Check wether this script is installed
@@ -326,7 +326,14 @@ function isInstalled () {
 
 // Check wether an admin is registered
 function isAdminRegistered () {
-       return ((isConfigEntrySet('ADMIN_REGISTERED')) && (getConfig('ADMIN_REGISTERED') == 'Y'));
+       // Is cache set?
+       if (!isset($GLOBALS['is_admin_registered'])) {
+               // Simply check it
+               $GLOBALS['is_admin_registered'] = ((isConfigEntrySet('ADMIN_REGISTERED')) && (getConfig('ADMIN_REGISTERED') == 'Y'));
+       } // END - if
+
+       // Return it
+       return $GLOBALS['is_admin_registered'];
 }
 
 // Checks wether the reset mode is active
@@ -337,8 +344,14 @@ function isResetModeEnabled () {
 
 // Checks wether the debug mode is enabled
 function isDebugModeEnabled () {
-       // Simply check it
-       return ((isConfigEntrySet('DEBUG_MODE')) && (getConfig('DEBUG_MODE') == 'Y'));
+       // Is cache set?
+       if (!isset($GLOBALS['is_debugmode_enabled'])) {
+               // Simply check it
+               $GLOBALS['is_debugmode_enabled'] = ((isConfigEntrySet('DEBUG_MODE')) && (getConfig('DEBUG_MODE') == 'Y'));
+       } // END - if
+
+       // Return it
+       return $GLOBALS['is_debugmode_enabled'];
 }
 
 // Checks wether SQL debugging is enabled