+ // we have a bug with msgid not getting filled.
+ $cev = DB_DataObject::Factory('Events');
+ $cev->on_table = $this->table;
+ $cev->on_id = $w->id;
+ $cev->whereAdd("action IN ('NOTIFYSENT', 'NOTIFYFAIL')");
+ $cev->limit(1);
+ if ($cev->count()) {
+ $cev->find(true);
+ $w->flagDone($cev, $cev->action == 'NOTIFYSENT' ? 'alreadysent' : '');
+ $this->errorHandler( $cev->action . " (fix old) ". $cev->remarks);
+ }
+
+