mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 13:58:54 +00:00
[ticket/14425] Allow setting unix socket in database tests
PHPBB3-14425
This commit is contained in:
parent
0c34641abd
commit
57b226ec76
1 changed files with 11 additions and 4 deletions
|
@ -85,12 +85,19 @@ class phpbb_database_test_connection_manager
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
if (!empty($this->config['dbport']) && !is_numeric($this->config['dbport']) && $this->dbms['PDO'] != 'pgsql')
|
||||||
|
{
|
||||||
|
$dsn .= 'unix_socket=' . $this->config['dbport'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$dsn .= 'host=' . $this->config['dbhost'];
|
$dsn .= 'host=' . $this->config['dbhost'];
|
||||||
|
|
||||||
if ($this->config['dbport'])
|
if ($this->config['dbport'])
|
||||||
{
|
{
|
||||||
$dsn .= ';port=' . $this->config['dbport'];
|
$dsn .= ';port=' . $this->config['dbport'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($use_db)
|
if ($use_db)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue