From 826b5fdfd632c703653cddc61aa7898920d88d92 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Mon, 15 Oct 2018 09:54:08 +0900 Subject: [PATCH] Move master config to configs folder and create symlink --- www/admin/config.php | 26 +------------------------- www/configs/config.php | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 25 deletions(-) mode change 100755 => 120000 www/admin/config.php create mode 100755 www/configs/config.php diff --git a/www/admin/config.php b/www/admin/config.php deleted file mode 100755 index 0ddfd8a0..00000000 --- a/www/admin/config.php +++ /dev/null @@ -1,25 +0,0 @@ - includes master config -* HISTORY: -*********************************************************************/ - -define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR); -// config path prefix search, start with 0, got down each level __DIR__ has, if nothing found -> bail -$CONFIG_PATH_PREFIX = ''; -for ($dir_pos = 0, $dir_max = count(explode('/', __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) { - $CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR; - if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) { - require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc'; - break; - } -} -// fail if no base DS is not set -if (!defined('DS')) { - exit('Base config unloadable'); -} - -// __END__ diff --git a/www/admin/config.php b/www/admin/config.php new file mode 120000 index 00000000..17767f7f --- /dev/null +++ b/www/admin/config.php @@ -0,0 +1 @@ +../configs/config.php \ No newline at end of file diff --git a/www/configs/config.php b/www/configs/config.php new file mode 100755 index 00000000..0ddfd8a0 --- /dev/null +++ b/www/configs/config.php @@ -0,0 +1,25 @@ + includes master config +* HISTORY: +*********************************************************************/ + +define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR); +// config path prefix search, start with 0, got down each level __DIR__ has, if nothing found -> bail +$CONFIG_PATH_PREFIX = ''; +for ($dir_pos = 0, $dir_max = count(explode('/', __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) { + $CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR; + if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) { + require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc'; + break; + } +} +// fail if no base DS is not set +if (!defined('DS')) { + exit('Base config unloadable'); +} + +// __END__