Minor fixes and added more methods

This commit is contained in:
Mark Nielsen 2011-03-09 15:44:09 -08:00 committed by David Mudrak
parent 17252e2d8a
commit 7336701ff1
2 changed files with 9 additions and 6 deletions

View file

@ -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() {

View file

@ -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();
}