Migration of stelzi's commit 1022 with some changes so we have a nicer code. See...
[mailer.git] / inc / wrapper-functions.php
index 6803dfc37810eee46a9a9f38a5763230f3fb4365..b3c3c1359075475571a31c68efae5c3145b8cdb1 100644 (file)
@@ -125,11 +125,11 @@ function loadInclude ($INC) {
 function loadIncludeOnce ($INC) {
        // Is it not loaded?
        if (!isset($GLOBALS['load_once'][$INC])) {
+               // Mark it as loaded
+               $GLOBALS['load_once'][$INC] = "loaded";
+
                // Then try to load it
                loadInclude($INC);
-
-               // And mark it as loaded
-               $GLOBALS['load_once'][$INC] = "loaded";
        } // END - if
 }
 
@@ -278,7 +278,7 @@ function isInstalling () {
 
 // Check wether this script is installed
 function isInstalled () {
-       return (getConfig('MXCHANGE_INSTALLED') == 'Y');
+       return ((getConfig('MXCHANGE_INSTALLED') == 'Y') || (isIncludeReadable('inc/cache/config-local.php')));
 }
 
 // Check wether an admin is registered
@@ -372,5 +372,10 @@ function countPostSelection () {
        return countSelection(REQUEST_POST('sel'));
 }
 
+// Checks wether the config-local.php is loaded
+function isConfigLocalLoaded () {
+       return ((isset($GLOBALS['config_local_loaded'])) && ($GLOBALS['config_local_loaded'] === true));
+}
+
 // [EOF]
 ?>