From a109d5f32baef48efbca34dce506a4e101416782 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 23 Jul 2012 10:29:26 +0200 Subject: [PATCH] Fix: bug #467 --- htdocs/core/db/pgsql.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 2ef7e5a6ce3..34297a7c1fc 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -380,10 +380,9 @@ class DoliDBPgsql if (! $name) $name="postgres"; // When try to connect using admin user // try first Unix domain socket (local) - if ((! $host || $host == "" || $host == "localhost" || $host == "127.0.0.1") && ! defined('NOLOCALSOCKETPGCONNECT')) + if ((empty($host) || $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT')) { $con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty - //print "$con_string";exit; $this->db = pg_connect($con_string); }