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:
@@ -78,27 +78,19 @@ 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
|
||||||
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
|
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
|
||||||
// 2: if template not found, do not search, show error template
|
// 2: if template not found, do not search, show error template
|
||||||
// 3: if default template is not found, show error template, do not fall back to default tree
|
// 3: if default template is not found, show error template, do not fall back to default tree
|
||||||
// 4: very strict, even on normal fixable errors through error
|
// 4: very strict, even on normal fixable errors through error
|
||||||
// DEFINE('ERROR_STRICT', 3);
|
// DEFINE('ERROR_STRICT', 3);
|
||||||
// allow page caching in general, set to 'FALSE' if you do debugging or development!
|
// allow page caching in general, set to 'FALSE' if you do debugging or development!
|
||||||
// DEFINE('ALLOW_SMARTY_CACHE', FALSE);
|
// DEFINE('ALLOW_SMARTY_CACHE', FALSE);
|
||||||
// cache life time, in second', default here is 2 days (172800s)
|
// cache life time, in second', default here is 2 days (172800s)
|
||||||
// -1 is never expire cache
|
// -1 is never expire cache
|
||||||
// DEFINE('SMARTY_CACHE_LIFETIME', -1);
|
// DEFINE('SMARTY_CACHE_LIFETIME', -1);
|
||||||
|
|
||||||
/************* LOGOUT ********************/
|
/************* LOGOUT ********************/
|
||||||
// logout target
|
// logout target
|
||||||
@@ -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
|
||||||
@@ -161,7 +158,7 @@ define('CLASS_VARIABLE_ERROR_MODE', 3);
|
|||||||
// if we have a dev/live system
|
// if we have a dev/live system
|
||||||
// set_live is a per page/per item
|
// set_live is a per page/per item
|
||||||
// live_queue is a global queue system
|
// live_queue is a global queue system
|
||||||
// DEFINE('QUEUE', 'live_queue');
|
// DEFINE('QUEUE', 'live_queue');
|
||||||
|
|
||||||
/************* DB PATHS (PostgreSQL) *****************/
|
/************* DB PATHS (PostgreSQL) *****************/
|
||||||
// schema names, can also be defined per <DB INFO>
|
// schema names, can also be defined per <DB INFO>
|
||||||
@@ -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
12
www/configs/config.other.php
Executable 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__
|
||||||
@@ -853,12 +853,12 @@ function parseQueryString(query = '', return_key = '') {
|
|||||||
function getQueryStringParam(key)
|
function getQueryStringParam(key)
|
||||||
{
|
{
|
||||||
var url = new URL(window.location.href);
|
var url = new URL(window.location.href);
|
||||||
var param = url.searchParams.get(key);
|
var param = url.searchParams.get(key);
|
||||||
if (param) {
|
if (param) {
|
||||||
return param;
|
return param;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// *** MASTER logout call
|
// *** MASTER logout call
|
||||||
|
|||||||
Reference in New Issue
Block a user