From af936717039713a0023142e5de1353243cfcee2e Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 25 Jan 2016 17:52:47 -0500 Subject: [PATCH] Add option to force the download instead of the preview of a file through a URL parameter &dl=1 to download.php - refs BT#10749 --- main/document/download.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/document/download.php b/main/document/download.php index f036e162f2..e417d5ff5d 100755 --- a/main/document/download.php +++ b/main/document/download.php @@ -100,6 +100,7 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) { } // Launch event Event::event_download($doc_url); - DocumentManager::file_send_for_download($full_file_name); + $download = (!empty($_GET['dl']) ? true : false); + DocumentManager::file_send_for_download($full_file_name, $download); } exit;