diff --git a/app/common.php b/app/common.php index c9907ce17..aed07a50e 100644 --- a/app/common.php +++ b/app/common.php @@ -14,12 +14,16 @@ if (getenv('DATABASE_URL')) { define('DB_NAME', ltrim($dbopts["path"], '/')); } -if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'config.php')) { - require __DIR__.DIRECTORY_SEPARATOR.'config.php'; +$config_file = implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'config.php')); + +if (file_exists($config_file)) { + require $config_file; } -if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'config.php')) { - require __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'config.php'; +$config_file = implode(DIRECTORY_SEPARATOR, array(__DIR__, '..', 'data', 'config.php')); + +if (file_exists($config_file)) { + require $config_file; } require __DIR__.'/constants.php'; diff --git a/app/constants.php b/app/constants.php index a09aac196..3dd827b32 100644 --- a/app/constants.php +++ b/app/constants.php @@ -1,11 +1,17 @@