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
This commit is contained in:
Meik Sievertsen 2008-09-17 15:11:57 +00:00
parent ba882709d8
commit eb2050a720
3 changed files with 7 additions and 2 deletions

View file

@ -112,6 +112,7 @@
<li>[Fix] Display popular topic based on posts within topic instead of replies within topic. (Bug #16099)</li> <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] 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] 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] 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> <li>[Change] Display warning in ACP if config.php file is left writable.</li>

View file

@ -32,9 +32,11 @@ class dbal_mssql extends dbal
{ {
$this->persistency = $persistency; $this->persistency = $persistency;
$this->user = $sqluser; $this->user = $sqluser;
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database; $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.charset', 'UTF-8');
@ini_set('mssql.textlimit', 2147483647); @ini_set('mssql.textlimit', 2147483647);
@ini_set('mssql.textsize', 2147483647); @ini_set('mssql.textsize', 2147483647);

View file

@ -40,9 +40,11 @@ class dbal_mssql_odbc extends dbal
{ {
$this->persistency = $persistency; $this->persistency = $persistency;
$this->user = $sqluser; $this->user = $sqluser;
$this->server = $sqlserver . (($port) ? ':' . $port : '');
$this->dbname = $database; $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'); $max_size = @ini_get('odbc.defaultlrl');
if (!empty($max_size)) if (!empty($max_size))
{ {