From ace883d1682215b5b8e430efbc633042d27ece6a Mon Sep 17 00:00:00 2001 From: akulikov Date: Mon, 27 Apr 2009 15:09:50 +0000 Subject: [PATCH] first action git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/legacy@79 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/pg_DBConnector.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/pg_DBConnector.class.php b/classes/pg_DBConnector.class.php index c70e52e..2550de9 100644 --- a/classes/pg_DBConnector.class.php +++ b/classes/pg_DBConnector.class.php @@ -38,10 +38,10 @@ class DBConnector return self::$handlers[$handler_name]; } - if (!$handler = pg_connect("host='".$db_settings['host']."' dbname='".$db_settings['database']."' user='".$db_settings['user'].'" password="'.$db_settings['password']."'")) { - throw new MJException('Can\'t connect to DB '.pg_last_error($handler), 2); + if (!$handler = pg_connect("host='".$db_settings['host']."' dbname='".$db_settings['database']."' user='".$db_settings['user']."' password='".$db_settings['password']."'")) { + throw new MJException('Can\'t connect to DB '.pg_last_error(), 2); } - + return self::$handlers[$handler_name] = $handler; }