mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 10:54:21 +02:00
"MDL-21021, fixed private file url"
This commit is contained in:
parent
90723839ca
commit
b5e9bf485f
@ -581,7 +581,9 @@ function file_get_user_area_files($draftitemid, $filepath = '/', $filearea = 'us
|
||||
$foldername = explode('/', trim($item->filepath, '/'));
|
||||
$item->fullname = trim(array_pop($foldername), '/');
|
||||
} else {
|
||||
$item->url = $CFG->wwwroot . '/draftfile.php/' . $context->id .'/user_draft/'.$draftitemid.$item->filepath.$item->fullname;
|
||||
$fb = get_file_browser();
|
||||
$fileinfo = $fb->get_file_info($context, $file->get_filearea(), $file->get_itemid(), $file->get_filepath(), $file->get_filename());
|
||||
$item->url = $fileinfo->get_url();
|
||||
}
|
||||
$list[] = $item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user