1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-02 04:24:56 +02:00

Merge branch 'ticket/bantu/9518' into develop-olympus

* ticket/bantu/9518:
  [ticket/9518] Correctly create new connection on PostgreSQL when new connection is forced.
This commit is contained in:
Nils Adermann 2010-05-14 02:23:13 +02:00
commit c7e8e7e0bc

View File

@ -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)
{