DataObjects/Core_notify.php
[Pman.Core] / NotifySend.php
index c85351c..f409963 100644 (file)
@@ -95,7 +95,7 @@ class Pman_Core_NotifySend extends Pman
         $force = empty($opts['force']) ? 0 : 1;
         
         $w = DB_DataObject::factory($this->table);
-        
+//        $this->errorHandler("send repeat to early\n");
         if (!$w->get($id)) {
             $this->errorHandler("invalid id\n");
         }
@@ -364,8 +364,6 @@ class Pman_Core_NotifySend extends Pman
             ));
             $core_domain->insert();
         }
-        
-        print_R($core_domain);exit;
                         
         foreach($mxs as $mx) {
             
@@ -462,6 +460,10 @@ class Pman_Core_NotifySend extends Pman
                 
                 $ev->writeEventLog($this->debug_str);
                 
+                if(strtotime($w->act_when) > strtotime("NOW")){
+                    $w->act_when = date('Y-m-d H:i:s');
+                }
+                
                 $w->sent = date('Y-m-d H:i:s');
                 $w->msgid = $email['headers']['Message-Id'];
                 $w->event_id = $ev->id; // sent ok.. - no need to record it..