MDL-84483 core_files: Always fire after_file_created hook
This commit is contained in:
committed by
Huong Nguyen
parent
7956cebf42
commit
da9daf4437
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user