mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'wip-MDL-33550-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
4585e6ac98
18 changed files with 366 additions and 323 deletions
|
@ -596,6 +596,9 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
|
|||
$item->datemodified = $file->get_timemodified();
|
||||
$item->datecreated = $file->get_timecreated();
|
||||
$item->isref = $file->is_external_file();
|
||||
if ($item->isref && $file->get_status() == 666) {
|
||||
$item->originalmissing = true;
|
||||
}
|
||||
// find the file this draft file was created from and count all references in local
|
||||
// system pointing to that file
|
||||
$source = unserialize($file->get_source());
|
||||
|
@ -2310,7 +2313,7 @@ function send_stored_file($stored_file, $lifetime=86400 , $filter=0, $forcedownl
|
|||
}
|
||||
|
||||
// handle external resource
|
||||
if ($stored_file->is_external_file()) {
|
||||
if ($stored_file && $stored_file->is_external_file()) {
|
||||
$stored_file->send_file($lifetime, $filter, $forcedownload, $options);
|
||||
die;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue