summaryrefslogtreecommitdiff
path: root/classes/db.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-10 09:20:52 +0300
committerAndrew Dolgov <[email protected]>2017-12-10 09:20:52 +0300
commitf8db5bb4db45f7e867a7f1e29ef58e1fd1473edc (patch)
tree1ce09a2adb6966cb80652f3c5b813e8a5d563a76 /classes/db.php
parent3b2276274ae63a4319dfca06581e246cf9bcfa69 (diff)
installer: use PDO, improve wording for some notices
PDO wrapper: allow working with blank DB_HOST
Diffstat (limited to 'classes/db.php')
-rw-r--r--classes/db.php3
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);