if(strtotime($this->act_when) > strtotime("NOW")){
$this->act_when = $this->sqlValue('NOW()');
}
- $this->sent = $this->sent == '0000-00-00 00:00:00' ? $this->sqlValue('NOW()') :$this->sent; // do not update if sent.....
+ $this->sent = strtotime($this->sent) < 1 ? $this->sqlValue('NOW()') :$this->sent; // do not update if sent.....
$this->msgid = $msgid;
$this->event_id = $event->id;
$this->update($ww);
if (!$this->force) {
$w->whereAdd('act_when < NOW()'); // eg.. not if future..
}
+
$w->orderBy('act_when ASC'); // oldest first.
$total = min($w->count(), $opts['limit']);