ImportMailMessage.php
[Pman.Core] / ImportMailMessage.php
index e3cdad6..97b520e 100644 (file)
@@ -60,14 +60,9 @@ class Pman_Crm_ImportHtml extends Pman_Core_ConvertStyle
         // Import from URL
         if(isset($_REQUEST['importUrl']))
         {
-           // $host = parse_url($_REQUEST['importUrl']);
-//            if($host['host'] != 'localhost' && $host['host'] != 'roojs-edward.com' && $host['host'] != $_SERVER['HTTP_HOST'])
-//            {
-//                $this->jerr('Invalid URL!');
-//            }
             $this->checkHeader($_REQUEST['importUrl']);
             $data = $this->convertStyle($_REQUEST['importUrl'], '', true);
-         //   print_r($data);exit;
+         
             $this->jok($data);
             
         }
@@ -79,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!');
@@ -92,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);