MDL-39177 Updating userid when file is overwritten

This commit is contained in:
Marina Glancy
2013-05-21 10:57:44 +10:00
parent 239eb7e230
commit 6d5bcdebf1
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -839,7 +839,8 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
if (!$oldfile->is_directory() &&
($oldfile->get_contenthash() != $newfile->get_contenthash() ||
$oldfile->get_filesize() != $newfile->get_filesize() ||
$oldfile->get_referencefileid() != $newfile->get_referencefileid())) {
$oldfile->get_referencefileid() != $newfile->get_referencefileid() ||
$oldfile->get_userid() != $newfile->get_userid())) {
$oldfile->replace_file_with($newfile);
// push changes to all local files that are referencing this file
$fs->update_references_to_storedfile($oldfile);