Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-35376_23' of git://github.com/rlorenzo/moodle into …

…MOODLE_23_STABLE
  • Loading branch information...
commit 947d7759bbbda94f98a41dac3169e3ef34143f82 2 parents 4edc94c + 102d0bd
@danpoltawski danpoltawski authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/filelib.php
  2. +1 −1  lib/filestorage/file_storage.php
View
2  lib/filelib.php
@@ -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
View
2  lib/filestorage/file_storage.php
@@ -1821,7 +1821,7 @@ public function get_references_count_by_storedfile(stored_file $storedfile) {
* @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();
Please sign in to comment.
Something went wrong with that request. Please try again.