Force li3 connections to ignore Host/Port settings if a socket is provided.

This commit is contained in:
DariusIII
2016-05-04 10:34:43 +02:00
parent 3bce15b3f1
commit e0f447c9b6
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -1,4 +1,5 @@
2016-05-04 DariusIII
* Fix: Force li3 connections to ignore Host/Port settings if a socket is provided.
* Upd: Add patch for triggers to match the new releases reqid format (@rainje)
2016-05-01 DariusIII
* Upd: Revert updating process to original version
+9 -3
View File
@@ -91,17 +91,23 @@ if (file_exists($config)) {
}
if (isset($adapter)) {
$host = $port = '';
if (empty(DB_SOCKET)) {
$host = DB_HOST;
$port = DB_PORT;
}
Connections::add('default',
[
'type' => 'database',
'adapter' => $adapter,
'host' => DB_HOST,
'port' => DB_PORT,
'host' => $host,
'port' => $port,
'login' => DB_USER,
'password' => DB_PASSWORD,
'database' => DB_NAME,
'encoding' => 'UTF-8',
'persistent' => false
'persistent' => false,
'socket' => DB_SOCKET,
]
);
}