mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #4136 from marc1706/ticket/14425
[ticket/14425] Allow setting unix socket in database tests * marc1706/ticket/14425: [ticket/14425] Allow setting unix socket in database tests
This commit is contained in:
commit
9059864dac
1 changed files with 11 additions and 4 deletions
|
@ -85,11 +85,18 @@ class phpbb_database_test_connection_manager
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$dsn .= 'host=' . $this->config['dbhost'];
|
if (!empty($this->config['dbport']) && !is_numeric($this->config['dbport']) && $this->dbms['PDO'] != 'pgsql')
|
||||||
|
|
||||||
if ($this->config['dbport'])
|
|
||||||
{
|
{
|
||||||
$dsn .= ';port=' . $this->config['dbport'];
|
$dsn .= 'unix_socket=' . $this->config['dbport'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dsn .= 'host=' . $this->config['dbhost'];
|
||||||
|
|
||||||
|
if ($this->config['dbport'])
|
||||||
|
{
|
||||||
|
$dsn .= ';port=' . $this->config['dbport'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($use_db)
|
if ($use_db)
|
||||||
|
|
Loading…
Add table
Reference in a new issue