diff options
author | Andrew Dolgov <[email protected]> | 2017-12-10 09:20:52 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-12-10 09:20:52 +0300 |
commit | f8db5bb4db45f7e867a7f1e29ef58e1fd1473edc (patch) | |
tree | 1ce09a2adb6966cb80652f3c5b813e8a5d563a76 /classes | |
parent | 3b2276274ae63a4319dfca06581e246cf9bcfa69 (diff) |
installer: use PDO, improve wording for some notices
PDO wrapper: allow working with blank DB_HOST
Diffstat (limited to 'classes')
-rw-r--r-- | classes/db.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/db.php b/classes/db.php index 3f3c12680..b6320944b 100644 --- a/classes/db.php +++ b/classes/db.php @@ -52,8 +52,9 @@ class Db private function pdo_connect() { $db_port = defined('DB_PORT') && DB_PORT ? ';port=' . DB_PORT : ''; + $db_host = defined('DB_HOST') && DB_HOST ? ';host=' . DB_HOST : ''; - $this->pdo = new PDO(DB_TYPE . ':dbname=' . DB_NAME . ';host=' . DB_HOST . $db_port, + $this->pdo = new PDO(DB_TYPE . ':dbname=' . DB_NAME . $db_host . $db_port, DB_USER, DB_PASS); |