mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 12:10:34 +01:00
Merge branch 'MDL-35376' of git://github.com/rlorenzo/moodle
This commit is contained in:
commit
7e3d57fca9
@ -832,7 +832,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
|
||||
if ($oldfile->get_contenthash() != $newfile->get_contenthash() || $oldfile->get_filesize() != $newfile->get_filesize()) {
|
||||
$oldfile->replace_content_with($newfile);
|
||||
// push changes to all local files that are referencing this file
|
||||
$fs->update_references_to_storedfile($this);
|
||||
$fs->update_references_to_storedfile($oldfile);
|
||||
}
|
||||
|
||||
// unchanged file or directory - we keep it as is
|
||||
|
@ -1821,7 +1821,7 @@ class file_storage {
|
||||
* @param stored_file $storedfile
|
||||
*/
|
||||
public function update_references_to_storedfile(stored_file $storedfile) {
|
||||
global $CFG;
|
||||
global $CFG, $DB;
|
||||
$params = array();
|
||||
$params['contextid'] = $storedfile->get_contextid();
|
||||
$params['component'] = $storedfile->get_component();
|
||||
|
Loading…
x
Reference in New Issue
Block a user