mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
[ticket/10678] Add port handling for MSSQL tests
PHPBB3-10678
This commit is contained in:
@@ -63,6 +63,13 @@ class phpbb_database_test_connection_manager
|
|||||||
// e.g. Driver={SQL Server Native Client 10.0};Server=(local)\SQLExpress;
|
// e.g. Driver={SQL Server Native Client 10.0};Server=(local)\SQLExpress;
|
||||||
$dsn .= $this->config['dbhost'];
|
$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)
|
if ($use_db)
|
||||||
{
|
{
|
||||||
$dsn .= ';Database=' . $this->config['dbname'];
|
$dsn .= ';Database=' . $this->config['dbname'];
|
||||||
|
Reference in New Issue
Block a user