mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'dev_MDL-33513_files_source' of git://github.com/danpoltawski/moodle
This commit is contained in:
commit
cd925ac79b
13 changed files with 180 additions and 32 deletions
|
@ -770,6 +770,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
|
|||
$newhashes = array();
|
||||
foreach ($draftfiles as $file) {
|
||||
$newhash = $fs->get_pathname_hash($contextid, $component, $filearea, $itemid, $file->get_filepath(), $file->get_filename());
|
||||
file_restore_source_field_from_draft_file($file);
|
||||
$newhashes[$newhash] = $file;
|
||||
}
|
||||
$filecount = 0;
|
||||
|
@ -790,7 +791,6 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
|
|||
continue;
|
||||
}
|
||||
|
||||
file_restore_source_field_from_draft_file($newfile);
|
||||
// Replaced file content
|
||||
if ($oldfile->get_contenthash() != $newfile->get_contenthash()) {
|
||||
$oldfile->replace_content_with($newfile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue