Minor fixes and added more methods
This commit is contained in:
committed by
David Mudrak
parent
17252e2d8a
commit
7336701ff1
@@ -33,13 +33,13 @@ abstract class base_converter {
|
||||
public function get_convertdir() {
|
||||
global $CFG;
|
||||
|
||||
return "$CFG->dirroot/backup/temp/$this->convertdir";
|
||||
return "$CFG->dataroot/temp/backup/$this->convertdir";
|
||||
}
|
||||
|
||||
public function get_tempdir() {
|
||||
global $CFG;
|
||||
|
||||
return "$CFG->dirroot/backup/temp/$this->tempdir";
|
||||
return "$CFG->dataroot/temp/backup/$this->tempdir";
|
||||
}
|
||||
|
||||
public function delete_convertdir() {
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
* Convert Plan
|
||||
*/
|
||||
class convert_plan extends base_plan implements loggable {
|
||||
|
||||
/**
|
||||
* @var plan_converter
|
||||
*/
|
||||
protected $converter;
|
||||
|
||||
public function __construct(plan_converter $converter) {
|
||||
global $CFG;
|
||||
|
||||
$this->converter = $converter;
|
||||
$this->basepath = $CFG->dataroot . '/temp/backup/' . $converter->get_backupid();
|
||||
parent::__construct('convert_plan');
|
||||
}
|
||||
|
||||
@@ -23,6 +22,10 @@ class convert_plan extends base_plan implements loggable {
|
||||
// TODO: Implement log() method.
|
||||
}
|
||||
|
||||
public function get_basepath() {
|
||||
return $this->converter->get_convertdir();
|
||||
}
|
||||
|
||||
public function get_converterid() {
|
||||
return $this->converter->get_id();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user