1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

installer: use PDO, improve wording for some notices

PDO wrapper: allow working with blank DB_HOST
This commit is contained in:
Andrew Dolgov
2017-12-10 09:20:52 +03:00
parent 3b2276274a
commit f8db5bb4db
3 changed files with 40 additions and 65 deletions

View File

@@ -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);