DataObjects/core.sql
[Pman.Core] / DataObjects / Core_mailing_list_message.php
index 2a31a28..026a1cc 100644 (file)
@@ -213,12 +213,6 @@ class Pman_Core_DataObjects_Core_mailing_list_message extends DB_DataObject
         
         $ret = $r->toData();
         
-        $person = $contents['person'];
-        
-        if(!is_object($person)){
-            
-        }
-        
         $images = file_get_contents(session_save_path() . '/email-cache-' . getenv('APACHE_RUN_USER') . '/mail/' . $this->tableName() . '-' . $this->id . '-images.txt');
         
         $ret['body'] = str_replace('%Images%', $images, $ret['body']);
@@ -254,8 +248,6 @@ class Pman_Core_DataObjects_Core_mailing_list_message extends DB_DataObject
         ))."\n");
         
         
-        
-        
 // note the extra space to finish the last line..
         fwrite($fh, " " . "
 Content-Type: multipart/alternative; boundary=alt-{$random_hash}
@@ -291,7 +283,7 @@ Content-Transfer-Encoding: 7bit
         $imageCache = session_save_path() . '/email-cache-' . getenv('APACHE_RUN_USER') . '/mail/' . $this->tableName() . '-' . $this->id . '-images.txt';
         
         $ids = $this->attachmentIds();
-        print_r($ids);exit;
+        
         //$this->jerr(print_r($ids,true));
         
          
@@ -352,6 +344,11 @@ Content-Disposition: inline; filename={$imgfn}
         return '"' . addslashes($this->from_name) . '" <' . $this->from_email. '>'  ;
     }
     
+    function formatDate($dt, $format = 'd/M/Y')
+    {
+        return date($format, strtotime($dt));
+    } 
+    
     
     
 }