1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[ticket/10678] Add port handling for MSSQL tests

PHPBB3-10678
This commit is contained in:
Patrick Webster 2012-05-08 04:35:47 -05:00
parent 711d09633a
commit 1496a4198a

View File

@ -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'];