mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Now XMLDB installation is enabled! Old mysql.php and postgres7.php can
continue being used as previously until we finish all the required DDL functions. Also, this implies that *.sql files aren't needed anymore. Now all we have to do is to maintain the install.xml files from the editor.
This commit is contained in:
parent
8e6a09bd2b
commit
db8bd7a66f
4 changed files with 11 additions and 17 deletions
|
@ -46,7 +46,7 @@ function upgrade_plugins($type, $dir, $return) {
|
|||
include_once($fullplug . '/db/'. $CFG->dbtype . '.php'); // defines old upgrading function
|
||||
$oldupgrade = true;
|
||||
}
|
||||
if (is_readable($fullplug . '/db/upgrade.php') && $CFG->xmldb_enabled) {
|
||||
if (is_readable($fullplug . '/db/upgrade.php')) {
|
||||
include_once($fullplug . '/db/upgrade.php'); // defines new upgrading function
|
||||
$newupgrade = true;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ function upgrade_plugins($type, $dir, $return) {
|
|||
/// Both old .sql files and new install.xml are supported
|
||||
/// but we priorize install.xml (XMLDB) if present
|
||||
$status = false;
|
||||
if (file_exists($fullplug . '/db/install.xml') && $CFG->xmldb_enabled) {
|
||||
if (file_exists($fullplug . '/db/install.xml')) {
|
||||
$status = install_from_xmldb_file($fullplug . '/db/install.xml'); //New method
|
||||
} else if (file_exists($fullplug .'/db/'. $CFG->dbtype .'.sql')) {
|
||||
$status = modify_database($fullplug .'/db/'. $CFG->dbtype .'.sql'); //Old method
|
||||
|
@ -215,7 +215,7 @@ function upgrade_activity_modules($return) {
|
|||
include_once($fullmod .'/db/' . $CFG->dbtype . '.php'); // defines old upgrading function
|
||||
$oldupgrade = true;
|
||||
}
|
||||
if ( is_readable($fullmod . '/db/upgrade.php') && $CFG->xmldb_enabled) {
|
||||
if ( is_readable($fullmod . '/db/upgrade.php')) {
|
||||
include_once($fullmod . '/db/upgrade.php'); // defines new upgrading function
|
||||
$newupgrade = true;
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ function upgrade_activity_modules($return) {
|
|||
|
||||
/// Both old .sql files and new install.xml are supported
|
||||
/// but we priorize install.xml (XMLDB) if present
|
||||
if (file_exists($fullmod . '/db/install.xml') && $CFG->xmldb_enabled) {
|
||||
if (file_exists($fullmod . '/db/install.xml')) {
|
||||
$status = install_from_xmldb_file($fullmod . '/db/install.xml'); //New method
|
||||
} else {
|
||||
$status = modify_database($fullmod .'/db/'. $CFG->dbtype .'.sql'); //Old method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue