MDL-15320 support for other database driver types

This commit is contained in:
skodak 2008-06-20 07:05:46 +00:00
parent dc81d75374
commit 6566118c51

View File

@ -49,14 +49,9 @@ function setup_DB() {
$CFG->dboptions = array();
}
if ($CFG->dblibrary == 'adodb') {
$classname = $CFG->dbtype.'_adodb_moodle_database';
require_once($CFG->libdir.'/dml/'.$classname.'.php');
$DB = new $classname();
} else {
error('Not implemented db library yet: '.$CFG->dblibrary);
}
$classname = $CFG->dbtype.'_'.$CFG->dblibrary.'_moodle_database';
require_once($CFG->libdir.'/dml/'.$classname.'.php');
$DB = new $classname();
$CFG->dbfamily = $DB->get_dbfamily(); // TODO: BC only for now