provide proper config & defaults

This commit is contained in:
Ulf Gebhardt 2023-10-27 01:21:04 +02:00
parent bbeb07de11
commit af4152ae31
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
4 changed files with 23 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
/nbproject/private/
/cache/
/cache/
config.php

19
config.php.dist Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace WEBCRAFT;
function config($basepath){
return array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.url.to/project/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, $basepath.'/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, \SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'db_user'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'db_pw'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'db_name'),
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT, 'demo_basic'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'lib/system/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE','enUS')),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_CACHE, $basepath.'/cache/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH, $basepath.'/log/'));
}

View File

@ -2,6 +2,6 @@
require_once 'lib/autoload.inc'; //SYSTEM Classes
require_once 'teamspeak/autoload.inc'; //Project Classes
require_once '../../config/get_config.php';
require_once 'config.php';
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
\SYSTEM\system::start(\WEBCRAFT\config(dirname(__FILE__)));

0
log/.gitkeep Normal file
View File