diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-12-30 13:13:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-12-30 13:13:22 +0000 |
commit | 828be2ad6198538def4eb3da0ce03a34961a38e9 (patch) | |
tree | 7e56235e0af84c21f4381672353e92a3b9f4488c /includes/database.inc | |
parent | 26875e9b38985518e9ecf49d18682d42265cf806 (diff) | |
download | brdo-828be2ad6198538def4eb3da0ce03a34961a38e9.tar.gz brdo-828be2ad6198538def4eb3da0ce03a34961a38e9.tar.bz2 |
- Patch #13020 by chx: let Drupal handle multiple database layers.
- Removed the PEAR database backend. It's no longer being used/maintained.
Diffstat (limited to 'includes/database.inc')
-rw-r--r-- | includes/database.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/database.inc b/includes/database.inc index 9b6d9b647..0148f328d 100644 --- a/includes/database.inc +++ b/includes/database.inc @@ -103,13 +103,13 @@ function db_set_active($name = 'default') { } $db_type = substr($connect_url, 0, strpos($connect_url, '://')); + $handler = "includes/database.$db_type.inc"; - // TODO: Allow more than one database API to be present. - if ($db_type == 'mysql') { - include_once 'includes/database.mysql.inc'; + if (is_file($handler)) { + include_once($handler); } else { - include_once 'includes/database.pgsql.inc'; + die('Unsupported database type'); } $db_conns[$name] = db_connect($connect_url); @@ -175,4 +175,4 @@ function db_queryd($query) { // Initialize the default database. db_set_active(); -?>
\ No newline at end of file +?> |