]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Several more constants rewritten to getConfig()
[mailer.git] / inc / wrapper-functions.php
index 738b5b6e3d9be42f16008593b602f50c0e65d2eb..c59e12c9230ff867178214fe42712c79bf40bd95 100644 (file)
@@ -114,7 +114,7 @@ function clearOutputBuffer () {
 // Loads an include file and logs any missing files for debug purposes
 function loadInclude ($INC) {
        // Add the path. This is why we need a trailing slash in config.php
-       $FQFN = constant('PATH') . $INC;
+       $FQFN = getConfig('PATH') . $INC;
 
        // Is the include file there?
        if (!isIncludeReadable($INC)) {
@@ -142,7 +142,7 @@ function loadIncludeOnce ($INC) {
 // Checks wether an include file (non-FQFN better) is readable
 function isIncludeReadable ($INC) {
        // Construct FQFN
-       $FQFN = constant('PATH') . $INC;
+       $FQFN = getConfig('PATH') . $INC;
 
        // Is it readable?
        return isFileReadable($FQFN);
@@ -285,10 +285,10 @@ function isInstalled () {
        return (
        (
                // New config file found and loaded
-               getConfig('MXCHANGE_INSTALLED') == 'Y'
+               isIncludeReadable('inc/cache/config-local.php')
        ) || (
-               // Fall-back!
-               isIncludeReadable('inc/config.php')
+               // Fall-back to config
+               getConfig('MXCHANGE_INSTALLED') == 'Y'
        ) || (
                (
                        // New config file found, but not yet read
@@ -350,7 +350,7 @@ function copyFileVerified ($source, $dest, $chmod = '') {
        // Is the target directory there?
        if (!isDirectory(dirname($dest))) {
                // Then abort here
-               debug_report_bug('Cannot find directory ' . str_replace(constant('PATH'), '', dirname($dest)) . '.');
+               debug_report_bug('Cannot find directory ' . str_replace(getConfig('PATH'), '', dirname($dest)) . '.');
        } // END - if
 
        // Now try to copy it