From: Janusz Dobrowolski Date: Sun, 19 Mar 2017 14:26:09 +0000 (+0100) Subject: Additional fix to previous commit. X-Git-Tag: v2.4.2~19^2~19 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=8f7d6ecc5814cd339717606eda3dc7af2c431a8e Additional fix to previous commit. --- diff --git a/reporting/prn_redirect.php b/reporting/prn_redirect.php index f7a922b9..d5fe9cf6 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");