mirror of
https://github.com/nextcloud/server.git
synced 2026-06-07 07:43:18 -04:00
Merge pull request #44461 from nextcloud/backport/44394/stable28
This commit is contained in:
commit
88859aa41c
2 changed files with 13 additions and 3 deletions
|
|
@ -112,9 +112,9 @@ $CONFIG = [
|
|||
|
||||
/**
|
||||
* Your host server name, for example ``localhost``, ``hostname``,
|
||||
* ``hostname.example.com``, or the IP address. To specify a port use
|
||||
* ``hostname:####``; to specify a Unix socket use
|
||||
* ``/path/to/directory/containing/socket`` e.g. ``/run/postgresql/``.
|
||||
* ``hostname.example.com``, or the IP address.
|
||||
* To specify a port use ``hostname:####``, for IPv6 addresses use the URI notation ``[ip]:port``.
|
||||
* To specify a Unix socket use ``/path/to/directory/containing/socket``, e.g. ``/run/postgresql/``.
|
||||
*/
|
||||
'dbhost' => '',
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ class ConnectionFactory {
|
|||
$eventManager->addEventSubscriber(
|
||||
new SQLSessionInit("SET SESSION AUTOCOMMIT=1"));
|
||||
break;
|
||||
|
||||
case 'oci':
|
||||
$eventManager->addEventSubscriber(new OracleSessionInit);
|
||||
// the driverOptions are unused in dbal and need to be mapped to the parameters
|
||||
|
|
@ -151,6 +152,15 @@ class ConnectionFactory {
|
|||
unset($additionalConnectionParams['host']);
|
||||
break;
|
||||
|
||||
case 'pgsql':
|
||||
// pg_connect used by Doctrine DBAL does not support URI notation (enclosed in brackets)
|
||||
$matches = [];
|
||||
if (preg_match('/^\[([^\]]+)\]$/', $additionalConnectionParams['host'], $matches)) {
|
||||
// Host variable carries a port or socket.
|
||||
$additionalConnectionParams['host'] = $matches[1];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'sqlite3':
|
||||
$journalMode = $additionalConnectionParams['sqlite.journal_mode'];
|
||||
$additionalConnectionParams['platform'] = new OCSqlitePlatform();
|
||||
|
|
|
|||
Loading…
Reference in a new issue