From 55520a7296979c2dc0be9156aa0f2db00040df6d Mon Sep 17 00:00:00 2001 From: mdean Date: Sun, 1 Jul 2001 17:15:19 +0000 Subject: [PATCH] Added option to toggle use of pconnect. --- phpgwapi/inc/class.db_pgsql.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.db_pgsql.inc.php b/phpgwapi/inc/class.db_pgsql.inc.php index 23cd179baa..6f347af9c6 100644 --- a/phpgwapi/inc/class.db_pgsql.inc.php +++ b/phpgwapi/inc/class.db_pgsql.inc.php @@ -21,6 +21,7 @@ class db { var $User = ""; var $Password = ""; + var $use_pconnect = False; var $auto_stripslashes = False; var $Halt_On_Error = "yes"; ## "yes" (halt with message), "no" (ignore errors quietly), "report" (ignore errror, but spit a warning) @@ -54,7 +55,10 @@ class db { $this->ifadd($this->Port, "port="). $this->ifadd($this->User, "user="). $this->ifadd($this->Password, "password="); - $this->Link_ID=pg_pconnect($cstr); + if ($this->use_pconnect) + $this->Link_ID=pg_pconnect($cstr); + else + $this->Link_ID=pg_connect($cstr); if (!$this->Link_ID) { $this->halt("Link-ID == false, pconnect failed"); }