Additional fix to previous commit.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 19 Mar 2017 14:25:15 +0000 (15:25 +0100)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 19 Mar 2017 14:25:15 +0000 (15:25 +0100)
reporting/prn_redirect.php

index 9d9ac858d67a6aa58ad7e57d544c2660ac303104..64ab69fb7678375b61cfbbc33b687ddee0a68d6a 100644 (file)
@@ -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
+?>