MDL-21432 backup - root task, inforef and users handling completed, various fixes

This commit is contained in:
Eloy Lafuente
2010-07-14 23:59:19 +00:00
parent 2087babba1
commit 482aac657a
20 changed files with 1013 additions and 23 deletions
@@ -44,6 +44,7 @@ class restore_controller extends backup implements loggable {
protected $userid; // user id executing the restore
protected $operation; // Type of operation (backup/restore)
protected $target; // Restoring to new/existing/current_adding/_deleting
protected $samesite; // Are we restoring to the same site where the backup was generated
protected $status; // Current status of the controller (created, planned, configured...)
@@ -71,6 +72,7 @@ class restore_controller extends backup implements loggable {
$this->execution = backup::EXECUTION_INMEDIATE;
$this->operation = backup::OPERATION_RESTORE;
$this->executiontime = 0;
$this->samesite = false;
$this->checksum = '';
// Apply current backup version and release if necessary
@@ -173,6 +175,7 @@ class restore_controller extends backup implements loggable {
'mode-' . $this->mode .
'userid-' . $this->userid .
'target-' . $this->target .
'samesite-' . $this->samesite .
'operation-' . $this->operation .
'status-' . $this->status .
'execution-' . $this->execution .
@@ -227,6 +230,10 @@ class restore_controller extends backup implements loggable {
return $this->target;
}
public function is_samesite() {
return $this->samesite;
}
public function get_status() {
return $this->status;
}
@@ -355,6 +362,9 @@ class restore_controller extends backup implements loggable {
// Set the controller type to the one found in the information
$this->type = $this->info->type;
// Set the controller samesite flag as needed
$this->samesite = backup_general_helper::backup_is_samesite($this->info);
// Now we load the plan that will be configured following the
// information provided by the $info
$this->log('loading controller plan', backup::LOG_DEBUG);