From 1d064e0da50c53708a593e50932fe35eddc55278 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 24 Aug 2010 14:12:04 +0400 Subject: [PATCH] allow connections to pgsql without password --- db.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.php b/db.php index c07aa9fa..844bd0e4 100644 --- a/db.php +++ b/db.php @@ -5,7 +5,11 @@ require_once "config.php"; function db_connect($host, $user, $pass, $db) { if (DB_TYPE == "pgsql") { - $string = "dbname=$db user=$user password=$pass"; + $string = "dbname=$db user=$user"; + + if ($pass) { + $string .= " password=$pass"; + } if ($host) { $string .= " host=$host"; -- 2.39.5