mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-15405: missing check
This commit is contained in:
parent
7dfb3c1cb4
commit
eb37800b50
@ -150,7 +150,7 @@ function file_rewrite_urls($text, $contextid, $filepath, $filearea, $itemid, $cu
|
||||
// if a new upload has the same file path/name as an existing file, but different content, we put it in a distinct path.
|
||||
$existingfile = $fs->get_file($currentcontextid, $currentfilearea, $currentitemid, $currentfilepath, $currentfilename);
|
||||
$uploadedfile = $fs->get_file($contextid, $filearea, $itemid, $filepath, $currentfilename);
|
||||
if ($existingfile->get_contenthash() != $uploadedfile->get_contenthash()) {
|
||||
if ($existingfile && $uploadedfile && ($existingfile->get_contenthash() != $uploadedfile->get_contenthash())) {
|
||||
$filepath .= $currentitemid .'/';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user