]> git.wh0rd.org - tt-rss.git/commitdiff
allow connections to pgsql without password
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 24 Aug 2010 10:12:04 +0000 (14:12 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 24 Aug 2010 10:12:04 +0000 (14:12 +0400)
db.php

diff --git a/db.php b/db.php
index c07aa9fa2550123bf01f0c2b2cb6f2d861c28e7a..844bd0e418355ecbb8553869d28e96722e22ee1b 100644 (file)
--- 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";