mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +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
|
@ -2065,7 +2065,10 @@ function upgrade_fix_missing_root_folders_draft() {
|
|||
'filename' => '.',
|
||||
'userid' => 0, // Don't rely on any particular user for these system records.
|
||||
'filesize' => 0,
|
||||
'contenthash' => sha1(''));
|
||||
// Note: This does not use the file_storage API's hash calculator
|
||||
// because access to core APIs is not allowed during upgrade.
|
||||
'contenthash' => sha1(''),
|
||||
);
|
||||
foreach ($rs as $r) {
|
||||
$r->pathnamehash = sha1("/$r->contextid/user/draft/$r->itemid/.");
|
||||
$DB->insert_record('files', (array)$r + $defaults);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue