- ALL classes are E_NOTICE safe as far as possible. There might be some minor things left over which will be cleaned up in further testing - Added declare(strict_types=1); on all pages for trying to make all calls strict - Added page_content sub content to edit_page, with this some inner page content with ACL can be set, eg for use with Ajax/JS calls with backend. Also alias can be set so the control ajax pages can back reference to the master page content setting. Currently only one back reference is allowed - Note that the PAGES array has no numeric indexes, but uses the cuid as index
33 lines
1.1 KiB
PHP
Executable File
33 lines
1.1 KiB
PHP
Executable File
<?php declare(strict_types=1);
|
|
/********************************************************************
|
|
* 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(DIRECTORY_SEPARATOR, __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');
|
|
}
|
|
// find trigger name "admin/" or "frontend/" in the getcwd() folder
|
|
foreach (array ('admin', 'frontend') as $folder) {
|
|
if (strstr(getcwd(), DS.$folder)) {
|
|
define('CONTENT_PATH', $folder.DS);
|
|
break;
|
|
}
|
|
}
|
|
|
|
// __END__
|