Merge pull request #11783 from owncloud/allow_passing_driver_options
allow passing db driver options
This commit is contained in:
commit
a00712aa65
|
@ -119,6 +119,13 @@ $CONFIG = array(
|
|||
*/
|
||||
'dbtableprefix' => '',
|
||||
|
||||
/**
|
||||
* Additional driver options for the database connection, eg. to enable SSL encryption in MySQL:
|
||||
*/
|
||||
'dbdriveroptions' => array(
|
||||
PDO::MYSQL_ATTR_SSL_CA => '/file/path/to/ca_cert.pem',
|
||||
),
|
||||
|
||||
/**
|
||||
* Indicates whether the ownCloud instance was installed successfully; ``true``
|
||||
* indicates a successful installation, and ``false`` indicates an unsuccessful
|
||||
|
|
|
@ -153,6 +153,13 @@ class ConnectionFactory {
|
|||
}
|
||||
|
||||
$connectionParams['tablePrefix'] = $config->getSystemValue('dbtableprefix', 'oc_');
|
||||
|
||||
//additional driver options, eg. for mysql ssl
|
||||
$driverOptions = $config->getSystemValue('dbdriveroptions', null);
|
||||
if ($driverOptions) {
|
||||
$connectionParams['driverOptions'] = $driverOptions;
|
||||
}
|
||||
|
||||
return $connectionParams;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue