]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19474 finally dropping support for old adodb moodle database drivers, yay!
authorskodak <skodak>
Thu, 8 Oct 2009 22:25:28 +0000 (22:25 +0000)
committerskodak <skodak>
Thu, 8 Oct 2009 22:25:28 +0000 (22:25 +0000)
lib/dmllib.php

index c09748aa9b2a6180b203d4a66218729453d85965..18a82457fecefeee8076d964fc6fb6ed2c89be6e 100644 (file)
@@ -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';
         }
     }