mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
Merge branch 'MDL-60105_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
db7083c4c4
@ -61,11 +61,11 @@ if ($mform->is_cancelled()) {
|
||||
|
||||
} else if ($formdata = $mform->get_data()) {
|
||||
$formdata = file_postupdate_standard_filemanager($formdata, 'files', $options, $context, 'mod_folder', 'content', 0);
|
||||
$DB->set_field('folder', 'revision', $folder->revision+1, array('id'=>$folder->id));
|
||||
|
||||
// Update the variable of the folder revision so we can pass it as an accurate snapshot later.
|
||||
$folder->timemodified = time();
|
||||
$folder->revision = $folder->revision + 1;
|
||||
|
||||
$DB->update_record('folder', $folder);
|
||||
|
||||
$params = array(
|
||||
'context' => $context,
|
||||
'objectid' => $folder->id
|
||||
|
@ -231,6 +231,8 @@ class document implements \renderable, \templatable {
|
||||
|
||||
if ($file = $fs->get_file_by_id($id)) {
|
||||
$this->files[$id] = $file;
|
||||
} else {
|
||||
unset($this->files[$id]); // Index is out of date and referencing a file that does not exist.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user