From 5d3d6f1dc8566693c006f4b01edb74f6f31334b5 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 19 Mar 2017 15:25:15 +0100 Subject: [PATCH] Additional fix to previous commit. --- reporting/prn_redirect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reporting/prn_redirect.php b/reporting/prn_redirect.php index 9d9ac858..64ab69fb 100644 --- a/reporting/prn_redirect.php +++ b/reporting/prn_redirect.php @@ -32,7 +32,7 @@ if (isset($_GET['xls']) || isset($_GET['xml'])) $filename = $_GET['filename']; $unique_name = preg_replace('/[^0-9_a-z.\-]/i', '', $_GET['unique']); $path = company_path(). '/pdf_files/'; - header("Content-type: application/vnd.ms-excel"); + header("Content-type: ". (isset($_GET['xls']) ? "application/vnd.ms-excel" : "text/xml")); header("Content-Disposition: attachment; filename=$filename" ); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); @@ -60,4 +60,4 @@ if ($rep_file) { display_error("Cannot find report file '$rep'"); exit(); -?> \ No newline at end of file +?> -- 2.30.2