Skip to content

Commit

Permalink
MDL-58904 backup: old backups do not contain new fields
Browse files Browse the repository at this point in the history
Hence we need to apply DB defaults for them when missing:

  - type = 0
  - timesort = null
  • Loading branch information
stronk7 committed May 11, 2017
1 parent bcf69a6 commit f86e869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup/moodle2/restore_stepslib.php
Expand Up @@ -2705,11 +2705,11 @@ public function process_calendarevents($data) {
'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,
Expand Down

0 comments on commit f86e869

Please sign in to comment.