diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-07-30 19:12:27 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-07-30 19:12:27 +0200 |
commit | 536552b118b2796ccbad1d059c415c4faad2eb36 (patch) | |
tree | 62c6571e36d5dc8f254c234abb7ffd3ce54f3972 /inc/auth | |
parent | 8b829d43781cf602c3152baa57853dc31da3f395 (diff) | |
download | rpg-536552b118b2796ccbad1d059c415c4faad2eb36.tar.gz rpg-536552b118b2796ccbad1d059c415c4faad2eb36.tar.bz2 |
PGSQL auth backend - connect via socket FS#1198
If the server field is empty in configuration the postgres backend will
try to connect via a local socket to the server
darcs-hash:20070730171227-7ad00-83bb5c4e60fec79e116343b1043a0dfe9800f82b.gz
Diffstat (limited to 'inc/auth')
-rw-r--r-- | inc/auth/pgsql.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/auth/pgsql.class.php b/inc/auth/pgsql.class.php index cb3d2319f..ae8d08666 100644 --- a/inc/auth/pgsql.class.php +++ b/inc/auth/pgsql.class.php @@ -43,7 +43,7 @@ class auth_pgsql extends auth_mysql { $this->defaultgroup = $conf['defaultgroup']; // set capabilities based upon config strings set - if (empty($this->cnf['server']) || empty($this->cnf['user']) || + if (empty($this->cnf['user']) || empty($this->cnf['password']) || empty($this->cnf['database'])){ if ($this->cnf['debug']) msg("PgSQL err: insufficient configuration.",-1,__LINE__,__FILE__); @@ -281,7 +281,7 @@ class auth_pgsql extends auth_mysql { */ function _openDB() { if (!$this->dbcon) { - $dsn = 'host='.$this->cnf['server']; + $dsn = $this->cnf['server'] ? 'host='.$this->cnf['server'] : ''; $dsn .= ' port='.$this->cnf['port']; $dsn .= ' dbname='.$this->cnf['database']; $dsn .= ' user='.$this->cnf['user']; |