diff options
author | Mario <mario@mariovavti.com> | 2022-02-10 18:57:44 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-10 18:57:44 +0000 |
commit | 35877b13825b2c3db44ff89977344b84f8e21d9a (patch) | |
tree | 4354a09a1f603d46d62ea7b9c9c0e49adea3e319 /boot.php | |
parent | c5312871704631b64afb3a146fc52b14949e7ee5 (diff) | |
download | volse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.tar.gz volse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.tar.bz2 volse-hubzilla-35877b13825b2c3db44ff89977344b84f8e21d9a.zip |
allow to override the DB charset via the $db_charset variable in .htconfig.php
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -664,12 +664,17 @@ function sys_boot() { require_once('include/dba/dba_driver.php'); if (!App::$install) { - DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, App::$install); + + if (empty($db_charset)) { + $db_charset = ((intval($db_type) === 0) ? 'utf8mb4' : 'UTF8'); + } + + DBA::dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $db_charset, App::$install); if (!DBA::$dba->connected) { system_unavailable(); } - unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type); + unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $db_charset); /* * Load configs from db. Overwrite configs from .htconfig.php |