MDL-64310 backup: allow session to be released during backup/restore
Amended to fix a wrong call to backup_controller() constructor, originally not passing USER->id
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
8d529d0a2d
commit
383b0f95ab
@@ -33,6 +33,9 @@ abstract class base_controller extends backup implements loggable {
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
/** @var bool Whether this backup should release the session. */
|
||||
protected $releasesession = backup::RELEASESESSION_NO;
|
||||
|
||||
/**
|
||||
* Gets the progress reporter, which can be used to report progress within
|
||||
* the backup or restore process.
|
||||
@@ -82,4 +85,14 @@ abstract class base_controller extends backup implements loggable {
|
||||
public function log($message, $level, $a = null, $depth = null, $display = false) {
|
||||
backup_helper::log($message, $level, $a, $depth, $display, $this->logger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set value of releasesession.
|
||||
* This is used to indicate if the session should be closed during the backup/restore.
|
||||
*
|
||||
* @return bool Indicates whether the session should be released.
|
||||
*/
|
||||
public function get_releasesession() {
|
||||
return $this->releasesession;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user