// 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)) {
// 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);
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
// 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