Browse Source
Revision to my previous suggestion
This grants "if port is defined" in the right context.
pull/536/head
Sethox
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
functions.inc.php
|
|
|
@ -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']; |
|
|
|
|