ImportMailMessage.php
[Pman.Core] / ImportMailMessage.php
index fde2a4c..6c55b73 100644 (file)
@@ -1,30 +1,35 @@
 <?php
 
+// should be in import folder... need to know where this is used though...
+
 require_once 'ConvertStyle.php';
 
 class Pman_Core_ImportMailMessage extends Pman_Core_ConvertStyle 
 {
     function getAuth()
     {
+        
         if (HTML_FlexyFramework::get()->cli) {
             return true;
         }
+        
         $this->authUser = $this->getAuthUser();
         if (!$this->authUser) {
             return false;
         }
-        return true;
+
+        return true;        
     }
     
-    function get()
+    function get($v, $opts=array())
     {
         $this->post();
         
         return $this->jerr("not allowed");
     }
     
-    function post()
-    
+    function post($v)
+    {   
         
         if(isset($_REQUEST['_convertToPlain']))
         {
@@ -55,6 +60,7 @@ class Pman_Core_ImportMailMessage extends Pman_Core_ConvertStyle
             }
             require_once 'File/Convert.php';
             $fc = new File_Convert($path, 'text/html');
+            
             $plain = $fc->convert('text/plain');
             $this->jok(file_get_contents($plain));
         }
@@ -62,13 +68,18 @@ class Pman_Core_ImportMailMessage extends Pman_Core_ConvertStyle
         // Import from URL
         if(isset($_REQUEST['importUrl']))
         {
-            print_r($_REQUEST);exit;
+            
             $this->checkHeader($_REQUEST['importUrl']);
+            
+            var_dump('die');exit;
+            
             $data = $this->convertStyle($_REQUEST['importUrl'], '', true);
          
             $this->jok($data);
             
         }
+        
+        
      
         // Import from file
         $htmlFile = DB_DataObject::factory('images');