1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-05 15:57:04 +02:00

MDL-58904 backup: old backups do not contain new fields

Hence we need to apply DB defaults for them when missing:

  - type = 0
  - timesort = null
This commit is contained in:
Eloy Lafuente (stronk7) 2017-05-11 19:55:21 +02:00
parent bcf69a655a
commit f86e8699b9

@ -2705,11 +2705,11 @@ class restore_calendarevents_structure_step extends restore_structure_step {
'userid' => $data->userid,
'repeatid' => $this->get_mappingid('event', $data->repeatid),
'modulename' => $data->modulename,
'type' => $data->type,
'type' => isset($data->type) ? $data->type : 0,
'eventtype' => $data->eventtype,
'timestart' => $this->apply_date_offset($data->timestart),
'timeduration' => $data->timeduration,
'timesort' => $this->apply_date_offset($data->timesort),
'timesort' => isset($data->timesort) ? $this->apply_date_offset($data->timesort) : null,
'visible' => $data->visible,
'uuid' => $data->uuid,
'sequence' => $data->sequence,