Adapting Fix on swf upload to correct problem with swf that do no open in student view in session -Refs BT#10599

1.10.x
Nicolas Ducoulombier 10 years ago
parent a8f4f4eaea
commit 349f43a39d
  1. 3
      main/document/download.php

@ -71,9 +71,12 @@ $fix_file_name = false;
if (isset($path_info['extension']) && $path_info['extension'] == 'swf') {
$fixed_url = str_replace('-', '_', $doc_url);
$doc_id = DocumentManager::get_document_id(api_get_course_info(), $doc_url);
if (!$doc_id) {
$doc_id = DocumentManager::get_document_id(api_get_course_info(), $doc_url, '0');
if (!$doc_id) {
$fix_file_name = true;
}
}
}
if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) {

Loading…
Cancel
Save