DB IO clean up work

Move methods around so they are grouped more logically. This is for a
future split out for function groups into sub classes to the main DB IO
class (private classes).

Also add a global variable $DB_CONFIG because setting this as constant
prevents us from override the debug config.
But for this add a third parameter to set debug flag override
This commit is contained in:
Clemens Schwaighofer
2022-02-24 13:25:11 +09:00
parent de1cdfdd40
commit f2c0ba737a
3 changed files with 511 additions and 463 deletions

View File

@@ -246,6 +246,8 @@ if (
// define the db config set name, the db config and the db schema
define('DB_CONFIG_NAME', $SITE_CONFIG[HOST_NAME]['db_host']);
define('DB_CONFIG', isset($DB_CONFIG[DB_CONFIG_NAME]) ? $DB_CONFIG[DB_CONFIG_NAME] : []);
// because we can't change constant, but we want to for db debug flag
$GLOBALS['DB_CONIFG'] = DB_CONFIG;
// define('DB_CONFIG_TARGET', SITE_CONFIG[$HOST_NAME]['db_host_target']);
// define('DB_CONFIG_OTHER', SITE_CONFIG[$HOST_NAME]['db_host_other']);
// override for login and global schemas