From 38faa30025717e8b4b8f8b6c3a69f9f603137e8a Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 20 Feb 2014 12:49:00 +0800 Subject: [PATCH] ImportMailMessage.php --- ImportMailMessage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ImportMailMessage.php b/ImportMailMessage.php index 4dc240ae..97b520e3 100644 --- a/ImportMailMessage.php +++ b/ImportMailMessage.php @@ -74,7 +74,7 @@ class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle 'ontable' =>'crm_mailing_list_message' )); $htmlFile->onUpload(false); - // print_r($htmlFile); + if($htmlFile->mimetype != 'text/html') { $this->jerr('accept html file only!'); @@ -87,6 +87,7 @@ class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle $data = $this->convertStyle('', $htmlFile->getStoreName(), false); $htmlFile->delete(); + unlink($htmlFile->getStoreName()) or die('Unable to delete the file'); $this->jok($data); -- 2.39.2