MDL-84483 core_files: Always fire after_file_created hook

This commit is contained in:
Jarad Barker
2025-10-16 09:04:09 +07:00
committed by Huong Nguyen
parent 7956cebf42
commit da9daf4437
-4
View File
@@ -1076,10 +1076,6 @@ class file_storage {
$newrecord->id = $DB->insert_record('files', $newrecord);
if ($newrecord->filename !== '.') {
if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
return;
}
// The $fileinstance is needed for the legacy callback.
$fileinstance = $this->get_file_instance($newrecord);
// Dispatch the new Hook implementation immediately after the legacy callback.