From 3f2b6c65d15deaaac934df837d5525a92e8f2b28 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 13 Dec 2010 15:42:43 +0800 Subject: [PATCH] GnumericToExcel.php --- GnumericToExcel.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GnumericToExcel.php b/GnumericToExcel.php index 76c3ac31..25f2ff35 100644 --- a/GnumericToExcel.php +++ b/GnumericToExcel.php @@ -89,6 +89,9 @@ class Pman_Core_GnumericToExcel extends Pman die("ERROR CONVERTING?:" . $cmd ."\n

OUTPUT:". htmlspecialchars($out)); } // unlink($srcTmp); + if (empty($fname)) { + $fname = basename($targetTmp); + } $fname .= preg_match('/\.xls/i', $fname) ? '' : '.xls'; // make sure it ends in xls.. header('Content-type: application/vnd.ms-excel'); -- 2.39.2