diff options
author | David M <davidmj@users.sourceforge.net> | 2007-07-30 03:16:31 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-07-30 03:16:31 +0000 |
commit | 35152dcd537a092d19696f07cf62048939041a25 (patch) | |
tree | 46bd537a2404e1873c1c1cf37a8bd4400f5cfcaf /phpBB/includes/db | |
parent | d7ae4540794708fe79fb9fff682935a3fa05d258 (diff) | |
download | forums-35152dcd537a092d19696f07cf62048939041a25.tar forums-35152dcd537a092d19696f07cf62048939041a25.tar.gz forums-35152dcd537a092d19696f07cf62048939041a25.tar.bz2 forums-35152dcd537a092d19696f07cf62048939041a25.tar.xz forums-35152dcd537a092d19696f07cf62048939041a25.zip |
#13874
git-svn-id: file:///svn/phpbb/trunk@7981 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/mssql.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 422a5d44a4..f07d1adfe9 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -39,7 +39,14 @@ class dbal_mssql extends dbal @ini_set('mssql.textlimit', 2147483647); @ini_set('mssql.textsize', 2147483647); - $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link); + if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.1', '>='))) + { + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mssql_connect($this->server, $this->user, $sqlpassword, $new_link); + } + else + { + $this->db_connect_id = ($this->persistency) ? @mssql_pconnect($this->server, $this->user, $sqlpassword) : @mssql_connect($this->server, $this->user, $sqlpassword); + } if ($this->db_connect_id && $this->dbname != '') { |