From: Andrew Dolgov Date: Tue, 24 Aug 2010 10:12:04 +0000 (+0400) Subject: allow connections to pgsql without password X-Git-Tag: 1.4.3-proper~11 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1d064e0da50c53708a593e50932fe35eddc55278;p=tt-rss.git allow connections to pgsql without password --- 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";