summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-27 12:51:26 +0100
committerLukas Reschke <lukas@owncloud.com>2014-10-27 21:39:34 +0100
commit233c49f4b9fc90f5bd023420ed899439fb413db0 (patch)
treeb0df628bd066ae1337a803b476026b5c48b2549f /lib/private/util.php
parent25a4b5a93581800887fceef7444b0d3702e4f018 (diff)
downloadnextcloud-server-233c49f4b9fc90f5bd023420ed899439fb413db0.tar.gz
nextcloud-server-233c49f4b9fc90f5bd023420ed899439fb413db0.zip
Make supported DBs configurable within config.php
This commit will make the supported DBs for installation configurable within config.php. By default the following databases are tested: "sqlite", "mysql", "pgsql". The reason behind this is that there might be instances where we want to prevent SQLite to be used by mistake. To test this play around with the new configuration parameter "supportedDatabases".
Diffstat (limited to 'lib/private/util.php')
-rw-r--r--lib/private/util.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 858138f58fe..dd131e41310 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -436,12 +436,9 @@ class OC_Util {
}
$webServerRestart = false;
- //check for database drivers
- if (!(is_callable('sqlite_open') or class_exists('SQLite3'))
- and !is_callable('mysql_connect')
- and !is_callable('pg_connect')
- and !is_callable('oci_connect')
- ) {
+ $setup = new OC_Setup($config);
+ $availableDatabases = $setup->getSupportedDatabases();
+ if (empty($availableDatabases)) {
$errors[] = array(
'error' => $l->t('No database drivers (sqlite, mysql, or postgresql) installed.'),
'hint' => '' //TODO: sane hint