aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/db/mssql.php4
-rw-r--r--phpBB/includes/db/mssql_odbc.php4
3 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d97c36d540..0d45c5f5ca 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -112,6 +112,7 @@
<li>[Fix] Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)</li>
<li>[Fix] Expand shown ban reason in unban screen to fully show long entries. (Bug #16234)</li>
<li>[Fix] Preserve alpha transparency for created thumbnails. (Bug #16575)</li>
+ <li>[Fix] Use correct port delimiter for MSSQL connections in windows. (Bug #16615)</li>
<li>[Change] No longer allow the direct use of MULTI_INSERT in sql_build_array. sql_multi_insert() must be used.</li>
<li>[Change] Display warning in ACP if config.php file is left writable.</li>
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index 97be2bfb3f..4131be2c32 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -32,9 +32,11 @@ class dbal_mssql extends dbal
{
$this->persistency = $persistency;
$this->user = $sqluser;
- $this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
+ $port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':';
+ $this->server = $sqlserver . (($port) ? $port_delimiter . $port : '');
+
@ini_set('mssql.charset', 'UTF-8');
@ini_set('mssql.textlimit', 2147483647);
@ini_set('mssql.textsize', 2147483647);
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index 3b5f41affd..a29af45c8f 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -40,9 +40,11 @@ class dbal_mssql_odbc extends dbal
{
$this->persistency = $persistency;
$this->user = $sqluser;
- $this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database;
+ $port_delimiter = (defined('PHP_OS') && substr(PHP_OS, 0, 3) === 'WIN') ? ',' : ':';
+ $this->server = $sqlserver . (($port) ? $port_delimiter . $port : '');
+
$max_size = @ini_get('odbc.defaultlrl');
if (!empty($max_size))
{