From: Edward Date: Thu, 20 Feb 2014 04:49:00 +0000 (+0800) Subject: ImportMailMessage.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=38faa30025717e8b4b8f8b6c3a69f9f603137e8a ImportMailMessage.php --- 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);