allow passing db driver optionstags/v8.0.0alpha1
@@ -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; | |||
} | |||
} |