Merge pull request #32899 from Retidurc/pdo-attr-persistent

Expose Doctrine support for persistent connections in PDO in Nextcloud settings
This commit is contained in:
blizzz 2022-10-03 12:34:39 +02:00 committed by GitHub
commit 3efc9d7d37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -138,6 +138,12 @@ $CONFIG = [
*/
'dbtableprefix' => '',
/**
* Enable persistent connexions to the database.
* This setting uses the "persistent" option from doctrine dbal, wich in turns
* uses the PDO::ATTR_PERSISTENT option from de pdo driver.
*/
'dbpersistent' => '',
/**
* Indicates whether the Nextcloud instance was installed successfully; ``true``

View file

@ -233,6 +233,10 @@ class ConnectionFactory {
];
}
if ($this->config->getValue('dbpersistent', false)) {
$connectionParams['persistent'] = true;
}
return $connectionParams;
}