aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-17 15:11:57 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-17 15:11:57 +0000
commiteb2050a720e3c85f8ae81bde2ac3086e1610c2f9 (patch)
treefaa12981a0f416464bff6c35d729fc131056673c
parentba882709d808e4267cc01a4a7023e1950c8c5783 (diff)
downloadforums-eb2050a720e3c85f8ae81bde2ac3086e1610c2f9.tar
forums-eb2050a720e3c85f8ae81bde2ac3086e1610c2f9.tar.gz
forums-eb2050a720e3c85f8ae81bde2ac3086e1610c2f9.tar.bz2
forums-eb2050a720e3c85f8ae81bde2ac3086e1610c2f9.tar.xz
forums-eb2050a720e3c85f8ae81bde2ac3086e1610c2f9.zip
Use correct port delimiter for MSSQL connections in windows. (Bug #16615)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8866 89ea8834-ac86-4346-8a33-228a782c2dd0
-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))
{