mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10678] Add port handling for MSSQL tests
PHPBB3-10678
This commit is contained in:
parent
711d09633a
commit
1496a4198a
1 changed files with 7 additions and 0 deletions
|
@ -63,6 +63,13 @@ class phpbb_database_test_connection_manager
|
|||
// e.g. Driver={SQL Server Native Client 10.0};Server=(local)\SQLExpress;
|
||||
$dsn .= $this->config['dbhost'];
|
||||
|
||||
// Primarily for MSSQL Native/Azure as ODBC needs it in $dbhost, attached to the Server param
|
||||
if ($this->config['dbport'])
|
||||
{
|
||||
$port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':';
|
||||
$dsn .= $port_delimiter . $this->config['dbport'];
|
||||
}
|
||||
|
||||
if ($use_db)
|
||||
{
|
||||
$dsn .= ';Database=' . $this->config['dbname'];
|
||||
|
|
Loading…
Add table
Reference in a new issue