Fixing some pathing information, for cases where the KB source

tree is not in or under the webroot.
This commit is contained in:
Dj Padzensky
2016-04-13 19:03:10 -07:00
parent ab02a9a162
commit f4e8eb176f
2 changed files with 6 additions and 6 deletions

View File

@@ -14,12 +14,12 @@ if (getenv('DATABASE_URL')) {
define('DB_NAME', ltrim($dbopts["path"], '/'));
}
if (file_exists('config.php')) {
require 'config.php';
if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'config.php')) {
require __DIR__.DIRECTORY_SEPARATOR.'config.php';
}
if (file_exists('data'.DIRECTORY_SEPARATOR.'config.php')) {
require 'data'.DIRECTORY_SEPARATOR.'config.php';
if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'config.php')) {
require __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'config.php';
}
require __DIR__.'/constants.php';