mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-43411 Backup: Fix restore from 1.9
The restore progress bars introduced a bug when restoring Moodle 1.9 backups. build_plan needs to be surrounded with start_progress/end_progress with the mode set to indeterminite or it throws coding errors.
This commit is contained in:
parent
bca2951282
commit
5d5c4c0b73
@ -422,6 +422,7 @@ class restore_controller extends base_controller {
|
||||
// Basic/initial prevention against time/memory limits
|
||||
set_time_limit(1 * 60 * 60); // 1 hour for 1 course initially granted
|
||||
raise_memory_limit(MEMORY_EXTRA);
|
||||
$this->progress->start_progress('Backup format conversion');
|
||||
|
||||
if ($this->status != backup::STATUS_REQUIRE_CONV) {
|
||||
throw new restore_controller_exception('cannot_convert_not_required_status');
|
||||
@ -452,6 +453,7 @@ class restore_controller extends base_controller {
|
||||
} else {
|
||||
$this->set_status(backup::STATUS_NEED_PRECHECK);
|
||||
}
|
||||
$this->progress->end_progress();
|
||||
}
|
||||
|
||||
// Protected API starts here
|
||||
|
Loading…
x
Reference in New Issue
Block a user