]> git.mjollnir.org Git - moodle.git/commitdiff
After some more tests... apply the new preconfigure_dbconnection()
authorstronk7 <stronk7>
Thu, 20 Dec 2007 23:15:03 +0000 (23:15 +0000)
committerstronk7 <stronk7>
Thu, 20 Dec 2007 23:15:03 +0000 (23:15 +0000)
to core. MDL-12657

Merged from MOODLE_19_STABLE

lib/dmllib.php
lib/setup.php

index 645229022b78d07cb101e8713ac782b4ad5dff40..c0a4fa130cf3a0452f3245f75406b69d3bbaed90 100644 (file)
@@ -2263,8 +2263,7 @@ function execute_sql_arr($sqlarr, $continue=true, $feedback=true) {
 /**
  * This internal function, called from setup.php, sets all the configuration
  * needed to work properly against any DB. It setups connection encoding
- * and some other variables. Also, ir defines the $CFG->dbfamily variable
- * to handle conditional code better than using $CFG->dbtype directly.
+ * and some other variables.
  *
  * This function must contain the init code needed for each dbtype supported.
  */
@@ -2304,8 +2303,6 @@ function configure_dbconnection() {
         ///       or to turn off magic_quotes to allow Moodle to do it properly
             break;
     }
-/// Finally define dbfamily
-    set_dbfamily();
 }
 
 /**
index bd70cdadf1ed981119364e577015a93c91d05e54..ca392352b8d3b25c4a1138c7154a8181c3d89138 100644 (file)
@@ -117,10 +117,9 @@ global $HTTPSPAGEREQUIRED;
 
 /// Connect to the database using adodb
 
-/// Some defines required BEFORE including AdoDB library
-    define ('ADODB_ASSOC_CASE', 0); //Use lowercase fieldnames for ADODB_FETCH_ASSOC
-                                    //(only meaningful for oci8po, it's the default
-                                    //for other DB drivers so this won't affect them)
+/// Set $CFG->dbfamily global
+/// and configure some other specific variables for each db BEFORE attempting the connection
+    preconfigure_dbconnection();
 
     require_once($CFG->libdir .'/adodb/adodb.inc.php'); // Database access functions