MDL-21432 backup - improve start date offset
authorEloy Lafuente <stronk7@moodle.org>
Tue, 27 Jul 2010 23:11:54 +0000 (23:11 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Tue, 27 Jul 2010 23:11:54 +0000 (23:11 +0000)
backup/util/plan/restore_structure_step.class.php

index 8a1db6c..1eb1d80 100644 (file)
@@ -277,6 +277,11 @@ abstract class restore_structure_step extends restore_step {
      */
     protected function apply_date_offset($value) {
 
+        // 0 doesn't offset
+        if ($value == 0) {
+            return $value;
+        }
+
         static $cache = array();
         // Lookup cache
         if (isset($cache[$this->get_restoreid()])) {