NotifySend.php
authorleon <leon@roojs.com>
Tue, 1 Mar 2022 09:35:27 +0000 (17:35 +0800)
committerleon <leon@roojs.com>
Tue, 1 Mar 2022 09:35:27 +0000 (17:35 +0800)
NotifySend.php

index fd50055..aab461b 100644 (file)
@@ -103,6 +103,11 @@ class Pman_Core_NotifySend extends Pman
         }
         $ev = $this->addEvent('NOTIFYFAIL', $w, isset($email['error'])  ?
                             $email['error'] : "INTERNAL ERROR  - We can not handle " . $w->ontable);
+        $ww = clone($w);
+        $w->sent = (!$w->sent || $w->sent == '0000-00-00 00:00:00') ? $w->sqlValue('NOW()') : $w->sent; // do not update if sent.....
+        $w->msgid = '';
+        $w->event_id = $ev->id;
+        $w->update($ww);
         $this->errorHandler("test\n");
         if (!$force && strtotime($w->act_when) < strtotime($w->sent)) {