From 9b9857ca4357661ea3e42bd180d9cad0678ff77a Mon Sep 17 00:00:00 2001 From: Janne Koschinski <janne@kuschku.de> Date: Sun, 18 Sep 2016 15:43:01 +0200 Subject: [PATCH] Added ability to use pgsql sockets --- backend/Config.php | 7 +++++-- qrs_config.default.php | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/backend/Config.php b/backend/Config.php index 40fb080..b931241 100644 --- a/backend/Config.php +++ b/backend/Config.php @@ -18,6 +18,9 @@ class Config { } public static function createFromGlobals() { - return new Config(path_prefix, 'pgsql:host=' . db_host . ';port=' . db_port . ';dbname=' . db_name . '', db_user, db_pass); + if (isset(db_connector)) + return new Config(path_prefix, db_connector, db_user, db_pass); + else + return new Config(path_prefix, 'pgsql:host=' . db_host . ';port=' . db_port . ';dbname=' . db_name . '', db_user, db_pass); } -} \ No newline at end of file +} diff --git a/qrs_config.default.php b/qrs_config.default.php index e5f61f0..836d63c 100644 --- a/qrs_config.default.php +++ b/qrs_config.default.php @@ -2,7 +2,13 @@ define('db_host', 'example.com'); define('db_port', 5432); define('db_name', 'quassel'); + +//Only use this if you know what you are doing +//define('db_connector', ''); + define('db_user', 'quassel'); define('db_pass', 'password'); + define('backend', 'pgsql-smart'); + define('path_prefix', ''); -- GitLab