aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-10 18:57:44 +0000
committerMario <mario@mariovavti.com>2022-02-10 18:57:44 +0000
commit35877b13825b2c3db44ff89977344b84f8e21d9a (patch)
tree4354a09a1f603d46d62ea7b9c9c0e49adea3e319 /boot.php
parentc5312871704631b64afb3a146fc52b14949e7ee5 (diff)
downloadvolse-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.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 5da93beae..004413a85 100644
--- a/boot.php
+++ b/boot.php
@@ -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