MDL-21432 move some stuff from base to backup plan classes
authorEloy Lafuente <stronk7@moodle.org>
Tue, 22 Jun 2010 10:31:37 +0000 (10:31 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Tue, 22 Jun 2010 10:31:37 +0000 (10:31 +0000)
backup/util/plan/backup_step.class.php
backup/util/plan/backup_task.class.php
backup/util/plan/base_step.class.php
backup/util/plan/base_task.class.php

index 2604ddd..b8f1e93 100644 (file)
@@ -38,6 +38,13 @@ abstract class backup_step extends base_step {
         }
         parent::__construct($name, $task);
     }
+
+    protected function get_backupid() {
+        if (is_null($this->task)) {
+            throw new backup_step_exception('not_specified_backup_task');
+        }
+        return $this->task->get_backupid();
+    }
 }
 
 /*
index f5e620d..f7840ef 100644 (file)
@@ -38,6 +38,10 @@ abstract class backup_task extends base_task {
         }
         parent::__construct($name, $plan);
     }
+
+    public function get_backupid() {
+        return $this->plan->get_backupid();
+    }
 }
 
 /*
index efaa092..96db85f 100644 (file)
@@ -87,13 +87,6 @@ abstract class base_step implements executable, loggable {
         return $this->task->get_setting_value($name);
     }
 
-    protected function get_backupid() {
-        if (is_null($this->task)) {
-            throw new base_step_exception('not_specified_base_task');
-        }
-        return $this->task->get_backupid();
-    }
-
     protected function get_courseid() {
         if (is_null($this->task)) {
             throw new base_step_exception('not_specified_base_task');
index 1ac7014..a066a23 100644 (file)
@@ -89,10 +89,6 @@ abstract class base_task implements checksumable, executable, loggable {
         return $this->get_setting($name)->get_value();
     }
 
-    public function get_backupid() {
-        return $this->plan->get_backupid();
-    }
-
     public function get_courseid() {
         return $this->plan->get_courseid();
     }