Merge pull request #11783 from owncloud/allow_passing_driver_options

allow passing db driver options
This commit is contained in:
Morris Jobke 2014-10-27 16:00:13 +01:00
commit a00712aa65
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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;
}
}