mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Bug #5352 - upgrade might be interrupted by user - upgrades are now logged into moddata/upgradelogs/, user abor is ignored and concurrent running of upgrades is prevented from one browser
This commit is contained in:
parent
0c23b59c9b
commit
583fad994c
7 changed files with 173 additions and 10 deletions
|
@ -93,6 +93,7 @@ function upgrade_local_db($continueto) {
|
|||
print_header($strdatabaseupgrades, $strdatabaseupgrades, $strdatabaseupgrades, '',
|
||||
'<script type="text/javascript" src="' . $CFG->wwwroot . '/lib/scroll_to_errors.js"></script>');
|
||||
|
||||
upgrade_log_start();
|
||||
require_once ($CFG->dirroot .'/local/db/'. $CFG->dbtype .'.php');
|
||||
|
||||
$db->debug=true;
|
||||
|
@ -101,6 +102,7 @@ function upgrade_local_db($continueto) {
|
|||
if (set_config('local_version', $local_version)) {
|
||||
notify(get_string('databasesuccess'), 'notifysuccess');
|
||||
notify(get_string('databaseupgradelocal', '', $local_version));
|
||||
upgrade_log_finish();
|
||||
print_continue($continueto);
|
||||
exit;
|
||||
} else {
|
||||
|
@ -112,8 +114,10 @@ function upgrade_local_db($continueto) {
|
|||
}
|
||||
|
||||
} else if ($local_version < $CFG->local_version) {
|
||||
upgrade_log_start();
|
||||
notify('WARNING!!! The local version you are using is OLDER than the version that made these databases!');
|
||||
}
|
||||
upgrade_log_finish();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue