Rewrites not to init config in config-functions.php (some still remain, many untested)
[mailer.git] / inc / wrapper-functions.php
index 236300372037b127ae81da81092a936139fb5aa3..882cd3aa9bd755a3a0554e4c3fc5dce28570aeb8 100644 (file)
@@ -286,7 +286,13 @@ function isInstalled () {
                $GLOBALS['is_installed'] = (
                (
                        // First is config
-                       getConfig('MXCHANGE_INSTALLED') == 'Y'
+                       (
+                               (
+                                       isConfigEntrySet('MXCHANGE_INSTALLED')
+                               ) && (
+                                       getConfig('MXCHANGE_INSTALLED') == 'Y'
+                               )
+                       )
                ) || (
                        // New config file found and loaded
                        isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php')
@@ -312,7 +318,7 @@ function isInstalled () {
 
 // Check wether an admin is registered
 function isAdminRegistered () {
-       return (getConfig('ADMIN_REGISTERED') == 'Y');
+       return ((isConfigEntrySet('ADMIN_REGISTERED')) && (getConfig('ADMIN_REGISTERED') == 'Y'));
 }
 
 // Checks wether the reset mode is active
@@ -324,13 +330,13 @@ function isResetModeEnabled () {
 // Checks wether the debug mode is enabled
 function isDebugModeEnabled () {
        // Simply check it
-       return (getConfig('DEBUG_MODE') == 'Y');
+       return ((isConfigEntrySet('DEBUG_MODE')) && (getConfig('DEBUG_MODE') == 'Y'));
 }
 
 // Checks wether we shall debug regular expressions
 function isDebugRegExpressionEnabled () {
        // Simply check it
-       return (getConfig('DEBUG_REGEX') == 'Y');
+       return ((isConfigEntrySet('DEBUG_REGEX')) && (getConfig('DEBUG_REGEX') == 'Y'));
 }
 
 // Checks wether the cache instance is valid