mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-58297 core: Update to use new hashing functions
This commit is contained in:
parent
a30a04fa01
commit
e6a4780452
6 changed files with 18 additions and 14 deletions
|
@ -1722,7 +1722,7 @@ abstract class repository implements cacheable_object {
|
|||
// size, and a contenthash which does not related to empty content.
|
||||
// If thereis no file size, or the contenthash is for an empty file, then the file has
|
||||
// yet to be successfully downloaded.
|
||||
$contentexists = $file->get_filesize() && $file->get_contenthash() !== sha1('');
|
||||
$contentexists = $file->get_filesize() && !$file->compare_to_string('');
|
||||
|
||||
if (!$file->get_status() && $contentexists) {
|
||||
// we already have the content in moodle filepool and it was synchronised recently.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue