Permalink
Browse files

MDL-35376 - Shortcut/alias not working for Private file repo

  • Loading branch information...
1 parent 935c3d5 commit ff37d63c1b33fc96a6650fbb0ba13dc2a37c0f22 @rlorenzo rlorenzo committed Sep 11, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/filelib.php
  2. +1 −1 lib/filestorage/file_storage.php
View
@@ -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 @@ 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();

0 comments on commit ff37d63

Please sign in to comment.