mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-57486 tool_recyclebin: Coding style fix
This commit is contained in:
parent
3d579187e9
commit
b3475a6874
@ -295,9 +295,11 @@ class category_bin extends base_bin {
|
||||
$fs->delete_area_files($context->id, 'tool_recyclebin', TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA, $item->id);
|
||||
} else {
|
||||
// Course category has been deleted. Find records using $item->id as this is unique for coursecat recylebin.
|
||||
$files = $DB->get_recordset('files', array('component' => 'tool_recyclebin',
|
||||
'filearea' => TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA,
|
||||
'itemid' => $item->id));
|
||||
$files = $DB->get_recordset('files', [
|
||||
'component' => 'tool_recyclebin',
|
||||
'filearea' => TOOL_RECYCLEBIN_COURSECAT_BIN_FILEAREA,
|
||||
'itemid' => $item->id,
|
||||
]);
|
||||
$fs = get_file_storage();
|
||||
foreach ($files as $filer) {
|
||||
$file = $fs->get_file_instance($filer);
|
||||
|
@ -282,9 +282,11 @@ class course_bin extends base_bin {
|
||||
$fs->delete_area_files($context->id, 'tool_recyclebin', TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA, $item->id);
|
||||
} else {
|
||||
// Course context has been deleted. Find records using $item->id as this is unique for course bin recyclebin.
|
||||
$files = $DB->get_recordset('files', array('component' => 'tool_recyclebin',
|
||||
'filearea' => TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA,
|
||||
'itemid' => $item->id));
|
||||
$files = $DB->get_recordset('files', [
|
||||
'component' => 'tool_recyclebin',
|
||||
'filearea' => TOOL_RECYCLEBIN_COURSE_BIN_FILEAREA,
|
||||
'itemid' => $item->id,
|
||||
]);
|
||||
$fs = get_file_storage();
|
||||
foreach ($files as $filer) {
|
||||
$file = $fs->get_file_instance($filer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user