diff options
author | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:23:13 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-05-14 02:23:13 +0200 |
commit | c7e8e7e0bc6551421c2dce5674816c0e7186037d (patch) | |
tree | 4d10b18b01fe5749755d7a07758bd97b33883c98 /phpBB/includes/db/postgres.php | |
parent | 8196d7d7113b45b52b8316849b2db5355de43429 (diff) | |
parent | 970848409d40040b3fdc07f45183935f7419b527 (diff) | |
download | forums-c7e8e7e0bc6551421c2dce5674816c0e7186037d.tar forums-c7e8e7e0bc6551421c2dce5674816c0e7186037d.tar.gz forums-c7e8e7e0bc6551421c2dce5674816c0e7186037d.tar.bz2 forums-c7e8e7e0bc6551421c2dce5674816c0e7186037d.tar.xz forums-c7e8e7e0bc6551421c2dce5674816c0e7186037d.zip |
Merge branch 'ticket/bantu/9518' into develop-olympus
* ticket/bantu/9518:
[ticket/9518] Correctly create new connection on PostgreSQL when new connection is forced.
Diffstat (limited to 'phpBB/includes/db/postgres.php')
-rw-r--r-- | phpBB/includes/db/postgres.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index d117e8c948..b3139b3d79 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -76,7 +76,14 @@ class dbal_postgres extends dbal $this->persistency = $persistency; - $this->db_connect_id = ($this->persistency) ? @pg_pconnect($connect_string, $new_link) : @pg_connect($connect_string, $new_link); + if ($this->persistency) + { + $this->db_connect_id = (!$new_link) ? @pg_pconnect($connect_string) : @pg_pconnect($connect_string, PGSQL_CONNECT_FORCE_NEW); + } + else + { + $this->db_connect_id = (!$new_link) ? @pg_connect($connect_string) : @pg_connect($connect_string, PGSQL_CONNECT_FORCE_NEW); + } if ($this->db_connect_id) { |