Skip to content

Commit

Permalink
MDL-19474 finally dropping support for old adodb moodle database driv…
Browse files Browse the repository at this point in the history
…ers, yay!
  • Loading branch information
skodak committed Oct 8, 2009
1 parent d6960b0 commit 79f0d55
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions lib/dmllib.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,42 +223,24 @@ function setup_DB() {
}

if (!isset($CFG->dblibrary)) {
$CFG->dblibrary = 'native';
// use new drivers instead of the old adodb driver names
switch ($CFG->dbtype) {
case 'postgres7' :
$CFG->dbtype = 'pgsql';
// continue, no break here
case 'pgsql' :
$CFG->dblibrary = 'native';
break;

case 'mssql_n':
$CFG->dbtype = 'mssql';
// continue, no break here
case 'mssql':
$CFG->dblibrary = 'native';
break;

case 'oci8po':
$CFG->dbtype = 'oci';
// continue, no break here
case 'oci':
$CFG->dblibrary = 'native';
break;

case 'mysql' :
if (!extension_loaded('mysqli')) {
$CFG->dblibrary = 'adodb';
break;
}
$CFG->dbtype = 'mysqli';
// continue, no break here
case 'mysqli' :
$CFG->dblibrary = 'native';
break;

default:
// the rest of drivers is not converted yet - keep adodb for now
$CFG->dblibrary = 'adodb';
}
}

Expand Down

0 comments on commit 79f0d55

Please sign in to comment.