Merge branch 'wip-MDL-33550-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Dan Poltawski 2012-06-14 16:23:08 +08:00
commit 4585e6ac98
18 changed files with 366 additions and 323 deletions

View file

@ -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;
}