mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Now set_dbfamily() will work properly when invoked from install.
This commit is contained in:
parent
c672870f8e
commit
d847d4027b
@ -1832,9 +1832,17 @@ function configure_dbconnection() {
|
||||
*/
|
||||
function set_dbfamily() {
|
||||
|
||||
global $CFG;
|
||||
global $CFG, $INSTALL;
|
||||
|
||||
switch ($CFG->dbtype) {
|
||||
// Since this function is also used during installation process, i.e. during install.php before $CFG->dbtype is set.
|
||||
// we need to get dbtype from the right variable
|
||||
if (!empty($INSTALL['dbtype'])) {
|
||||
$dbtype = $INSTALL['dbtype'];
|
||||
} else {
|
||||
$dbtype = $CFG->dbtype;
|
||||
}
|
||||
|
||||
switch ($dbtype) {
|
||||
case 'mysql':
|
||||
case 'mysqli':
|
||||
$CFG->dbfamily='mysql';
|
||||
|
Loading…
x
Reference in New Issue
Block a user