MDL-34859 backup: add restore defaults
This commit is contained in:
@@ -142,6 +142,9 @@ class restore_controller extends base_controller {
|
||||
// Load plan
|
||||
$this->load_plan();
|
||||
|
||||
// Apply all default settings (based on type/format/mode).
|
||||
$this->apply_defaults();
|
||||
|
||||
// Perform all initial security checks and apply (2nd param) them to settings automatically
|
||||
restore_check::check_security($this, true);
|
||||
|
||||
@@ -510,6 +513,15 @@ class restore_controller extends base_controller {
|
||||
$this->plan->build(); // Build plan for this controller
|
||||
$this->set_status(backup::STATUS_PLANNED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply defaults from the global admin settings
|
||||
*/
|
||||
protected function apply_defaults() {
|
||||
$this->log('applying restore defaults', backup::LOG_DEBUG);
|
||||
restore_controller_dbops::apply_config_defaults($this);
|
||||
$this->set_status(backup::STATUS_CONFIGURED);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user