- remove not used code - reorder defines for possible clean up targets - TARGET and HOST_NAME are set early HOST NAME is set right at the top TARGET is set after site configs is read - add more $_ENV reads DEFAULT_ACL_LEVEL LOCALE (encoding is read from locale which should be in the format of nn_CT.ENCODING, eg en_US.UTF-8), falls back to UTF-8 ADMIN.STYLESHEET ADMIN.JAVASCRIPT
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php // phpcs:ignore PSR1.Files.SideEffects
|
|
|
|
/********************************************************************
|
|
* AUTHOR: Clemens Schwaighofer
|
|
* CREATED: 2018/10/11
|
|
* SHORT DESCRIPTION:
|
|
* configuration file for core path settings
|
|
* CSV target paths, and other download access URLS or paths needed
|
|
* HISTORY:
|
|
*********************************************************************/
|
|
|
|
declare(strict_types=1);
|
|
|
|
// find trigger name "admin/" or "frontend/" in the getcwd() folder
|
|
$folder = '';
|
|
foreach (['admin', 'frontend'] as $_folder) {
|
|
if (strstr(getcwd() ?: '', DIRECTORY_SEPARATOR . $_folder)) {
|
|
$folder = $_folder;
|
|
break;
|
|
}
|
|
}
|
|
// if content path is empty, fallback is default
|
|
if (empty($folder)) {
|
|
$folder = 'default';
|
|
}
|
|
define('CONTENT_PATH', $folder . DIRECTORY_SEPARATOR);
|
|
|
|
// File and Folder paths
|
|
// ID is TARGET (first array element)
|
|
/*$PATHS = [
|
|
'test' => [
|
|
'csv_path' => '',
|
|
'perl_bin' => '',
|
|
'other_url' => '',
|
|
],
|
|
];*/
|
|
|
|
// paths
|
|
// define('CSV_PATH', $PATHS[TARGET]['csv_path'] ?? '');
|
|
// define('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin'] ?? '');
|
|
// define('REDIRECT_URL', $PATHS[TARGET]['redirect_url'] ?? '');
|
|
|
|
// __END__
|