mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
After some more tests... apply the new preconfigure_dbconnection()
to core. MDL-12657 Merged from MOODLE_19_STABLE
This commit is contained in:
parent
118e0116f3
commit
35c1c575d4
2 changed files with 4 additions and 8 deletions
|
@ -2263,8 +2263,7 @@ function execute_sql_arr($sqlarr, $continue=true, $feedback=true) {
|
||||||
/**
|
/**
|
||||||
* This internal function, called from setup.php, sets all the configuration
|
* This internal function, called from setup.php, sets all the configuration
|
||||||
* needed to work properly against any DB. It setups connection encoding
|
* needed to work properly against any DB. It setups connection encoding
|
||||||
* and some other variables. Also, ir defines the $CFG->dbfamily variable
|
* and some other variables.
|
||||||
* to handle conditional code better than using $CFG->dbtype directly.
|
|
||||||
*
|
*
|
||||||
* This function must contain the init code needed for each dbtype supported.
|
* 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
|
/// or to turn off magic_quotes to allow Moodle to do it properly
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/// Finally define dbfamily
|
|
||||||
set_dbfamily();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,10 +117,9 @@ global $HTTPSPAGEREQUIRED;
|
||||||
|
|
||||||
/// Connect to the database using adodb
|
/// Connect to the database using adodb
|
||||||
|
|
||||||
/// Some defines required BEFORE including AdoDB library
|
/// Set $CFG->dbfamily global
|
||||||
define ('ADODB_ASSOC_CASE', 0); //Use lowercase fieldnames for ADODB_FETCH_ASSOC
|
/// and configure some other specific variables for each db BEFORE attempting the connection
|
||||||
//(only meaningful for oci8po, it's the default
|
preconfigure_dbconnection();
|
||||||
//for other DB drivers so this won't affect them)
|
|
||||||
|
|
||||||
require_once($CFG->libdir .'/adodb/adodb.inc.php'); // Database access functions
|
require_once($CFG->libdir .'/adodb/adodb.inc.php'); // Database access functions
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue