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

1.9.x
Nicolas Ducoulombier 10 years ago
parent dce4356a2b
commit 50907061e9
  1. 3
      main/document/download.php

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

Loading…
Cancel
Save