From 92b37092408171bd719f6bea98726c76b456ae13 Mon Sep 17 00:00:00 2001 From: Laurent BEIGBEDER Date: Thu, 31 Oct 2019 15:31:56 +0100 Subject: [PATCH] #6610: génération du fichier output à partir de l'input si fichier local --- server/php/DownloadExport.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/php/DownloadExport.php b/server/php/DownloadExport.php index 2f5f698..fcde6ed 100644 --- a/server/php/DownloadExport.php +++ b/server/php/DownloadExport.php @@ -4,6 +4,7 @@ require_once("RequestManager.php"); require_once("Constants.php"); $op_id = $_REQUEST['id']; +$file_name = $_REQUEST['filename']; if (empty($op_id)) { @@ -51,7 +52,13 @@ switch($file_info["format"]) $file_info["mimetype"] = "text/plain"; } -$file_info["name"] = "treps_export_".$op_id.$file_info["extension"]; +//set name only if from local browse input mode +if($file_name) { + $file_info["name"] = $file_name.$file_info["extension"]; +}else { + $file_info["name"] = "treps_export_".$op_id.$file_info["extension"]; +} + //make sure the file exists if (!is_file($file_info["path"])) -- libgit2 0.21.2