config master update

- use config.other.php to include other none core settings
- fix tab intends for not used defines
- remove old ACL defines that are not needed
- move BASE_NAME out to new area

TODO: think about removing G_TITLE
TODO: think about BASE_NAME external setting
This commit is contained in:
Clemens Schwaighofer
2019-10-29 12:00:55 +09:00
parent 2210f62441
commit c77562b595
3 changed files with 40 additions and 25 deletions

View File

@@ -78,14 +78,6 @@ DEFINE('TEMPLATES', 'templates'.DS);
DEFINE('DEFAULT_HASH', 'sha256'); DEFINE('DEFAULT_HASH', 'sha256');
// default acl level // default acl level
DEFINE('DEFAULT_ACL_LEVEL', 80); DEFINE('DEFAULT_ACL_LEVEL', 80);
// default levels for certain actions
/* DEFINE('DEFAULT_ACL_READ', 20);
DEFINE('DEFAULT_ACL_CONFIRM', 35);
DEFINE('DEFAULT_ACL_MOD', 40);
DEFINE('DEFAULT_ACL_WRITE', 60);
DEFINE('DEFAULT_ACL_SEND', 70);
DEFINE('DEFAULT_ACL_DEL', 80);
DEFINE('DEFAULT_ACL_ADMIN', 100); */
// SSL host name // SSL host name
// DEFINE('SSL_HOST', 'ssl.host.name'); // DEFINE('SSL_HOST', 'ssl.host.name');
// error page strictness, Default is 3 // error page strictness, Default is 3
@@ -123,9 +115,12 @@ DEFINE('PAGE_WIDTH', 800);
// the default template name // the default template name
DEFINE('MASTER_TEMPLATE_NAME', 'main_body.tpl'); DEFINE('MASTER_TEMPLATE_NAME', 'main_body.tpl');
/************* SESSION NAMES *************/ /************* OVERALL CONTROL NAMES *************/
// base name // BELOW has HAS to be changed
// base name for all session and log names
DEFINE('BASE_NAME', 'CoreLibs'); DEFINE('BASE_NAME', 'CoreLibs');
/************* SESSION NAMES *************/
// server name HASH // server name HASH
DEFINE('SERVER_NAME_HASH', hash('crc32b', $_SERVER['HTTP_HOST'])); DEFINE('SERVER_NAME_HASH', hash('crc32b', $_SERVER['HTTP_HOST']));
DEFINE('SERVER_PATH_HASH', hash('crc32b', BASE)); DEFINE('SERVER_PATH_HASH', hash('crc32b', BASE));
@@ -145,10 +140,12 @@ DEFINE('DEFAULT_LANG', 'en_utf8');
// default web page encoding setting // default web page encoding setting
DEFINE('DEFAULT_ENCODING', 'UTF-8'); DEFINE('DEFAULT_ENCODING', 'UTF-8');
/************* LOGGING *******************/
// below two can be defined here, but they should be // below two can be defined here, but they should be
// defined in either the header file or the file itself // defined in either the header file or the file itself
/************* LOGGING *******************/ // as $LOG_FILE_ID which takes presence over LOG_FILE_ID
DEFINE('LOG_FILE_ID', ''); // see Basic class constructor
DEFINE('LOG_FILE_ID', BASE_NAME);
/************* CLASS ERRORS *******************/ /************* CLASS ERRORS *******************/
// 0 = default all OFF // 0 = default all OFF
@@ -189,6 +186,7 @@ if (file_exists(BASE.CONFIGS.'config.path.php')) {
require BASE.CONFIGS.'config.path.php'; require BASE.CONFIGS.'config.path.php';
} }
/************* MASTER INIT *****************/
// live frontend pages // live frontend pages
// ** missing live domains ** // ** missing live domains **
// get the name without the port // get the name without the port
@@ -257,10 +255,13 @@ DEFINE('JAVASCRIPT', 'frontend.js');
// anything optional // anything optional
/************* INTERNAL ******************/ /************* INTERNAL ******************/
// any other global definitons here // any other global definitons in the config.other.php
// DEFINE('SOME_ID', <SOME VALUE>); if (file_exists(BASE.CONFIGS.'config.other.php')) {
require BASE.CONFIGS.'config.other.php';
}
/************* CONVERT *******************/ /************* CONVERT *******************/
// this only needed if the external thumbnail create is used
$paths = array( $paths = array(
'/bin', '/bin',
'/usr/bin', '/usr/bin',
@@ -274,6 +275,7 @@ foreach ($paths as $path) {
} }
} }
/************* DEBUG *******************/
// turn off debug if debug flag is OFF // turn off debug if debug flag is OFF
if (defined('DEBUG') && DEBUG == false) { if (defined('DEBUG') && DEBUG == false) {
$ECHO_ALL = false; $ECHO_ALL = false;
@@ -291,6 +293,7 @@ if (defined('DEBUG') && DEBUG == false) {
$DEBUG_ALL_OVERRIDE = false; $DEBUG_ALL_OVERRIDE = false;
} }
/************* AUTO LOADER *******************/
// read auto loader // read auto loader
require BASE.LIB.'autoloader.php'; require BASE.LIB.'autoloader.php';

12
www/configs/config.other.php Executable file
View File

@@ -0,0 +1,12 @@
<?php declare(strict_types=1);
/********************************************************************
* AUTHOR: Clemens Schwaighofer
* CREATED: 2019/10/28
* SHORT DESCRIPTION:
* other global constant variables
* HISTORY:
*********************************************************************/
// DEFINE('SOME_ID', <SOME VALUE>);
// __END__