First step to clean up all files that are not mandatory for outside access * move all header/footer/smarty/set_paths/config files (inc) into includes/ folder * generate basic config.php that JUST loads the config.inc file (search) * config.inc file has sub sections for db access arrays and host configs, so config.inc is more static * Also move edit base and template arrays to the include folder * move the language po files to the 4dev folder as they do not need to sit outside * remove not maintained "files.php" TODO: split out templates and language files into external layout group perhaps drop the whole sub template include path thing as this is actually never really used and more annoying to maintain eg: layout/frontend/default/ -> layout/frontend eg: layout/fronend/default/template -> includes/frontend/template Also check splitting out the NOT define parts of the config.inc file G_TITLE, EDIT_STYLESHEET, EDIT_JAVASCRIPT, STYLESHEET, JAVASCRIPT to default define?
26 lines
848 B
PHP
Executable File
26 lines
848 B
PHP
Executable File
<?php
|
|
/********************************************************************
|
|
* AUTHOR: Clemens Schwaighofer
|
|
* CREATED: 2018/10/11
|
|
* SHORT DESCRIPTION:
|
|
* pre config included -> 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__
|