1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

Revision to my previous suggestion

This grants "if port is defined" in the right context.
This commit is contained in:
Sethox
2021-09-01 00:04:54 +02:00
committed by GitHub
parent 47b1eecdf6
commit 6bb8bc6fa0

View File

@ -1628,8 +1628,10 @@ function db_connection_string()
if ($socket) {
$dsn = "mysql:unix_socket={$socket};dbname={$database_name}";
} else {
} elseif ($CONF['database_port'] != null) {
$dsn = "mysql:host={$CONF['database_host']};port={$CONF['database_port']};dbname={$database_name}";
} else {
$dsn = "mysql:host={$CONF['database_host']};dbname={$database_name}";
}
} elseif (db_sqlite()) {
$db = $CONF['database_name'];