projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b713c3f
)
fix sent update
author
Alan
<alan@roojs.com>
Wed, 1 Nov 2023 03:35:06 +0000
(11:35 +0800)
committer
Alan
<alan@roojs.com>
Wed, 1 Nov 2023 03:35:06 +0000
(11:35 +0800)
DataObjects/Core_notify.php
patch
|
blob
|
history
Notify.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_notify.php
b/DataObjects/Core_notify.php
index
d8f343a
..
e316e0a
100644
(file)
--- a/
DataObjects/Core_notify.php
+++ b/
DataObjects/Core_notify.php
@@
-352,7
+352,7
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
if(strtotime($this->act_when) > strtotime("NOW")){
$this->act_when = $this->sqlValue('NOW()');
}
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);
$this->msgid = $msgid;
$this->event_id = $event->id;
$this->update($ww);
diff --git
a/Notify.php
b/Notify.php
index
5ed6a7b
..
f524ff2
100644
(file)
--- a/
Notify.php
+++ b/
Notify.php
@@
-225,6
+225,7
@@
class Pman_Core_Notify extends Pman
if (!$this->force) {
$w->whereAdd('act_when < NOW()'); // eg.. not if future..
}
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']);
$w->orderBy('act_when ASC'); // oldest first.
$total = min($w->count(), $opts['limit']);