projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6abbcdd
)
DataObjects/Core_notify.php
author
Alan Knowles
<alan@roojs.com>
Wed, 14 Oct 2015 06:51:48 +0000
(14:51 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 14 Oct 2015 06:51:48 +0000
(14:51 +0800)
DataObjects/Core_notify.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_notify.php
b/DataObjects/Core_notify.php
index
dc6bfca
..
a68e693
100644
(file)
--- a/
DataObjects/Core_notify.php
+++ b/
DataObjects/Core_notify.php
@@
-208,23
+208,22
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
if ($this->msgid != '') {
return 1;
}
if ($this->msgid != '') {
return 1;
}
+
// msgid is empty now..
// msgid is empty now..
- if ($this->event_id > 0 && strtotime($this->act_when) < time()) {
+ // if act_when is greater than now, then it's still pending.
+ if (strtotime($this->act_when) > time()) {
+ return 0;
+ }
+
+ // event id can be filled in with a failed attempt.
+
+ if ($this->event_id > 0) {
return -1;
}
return -1;
}
- return 0; // pending
-
- $this->whereAdd("msgid = '' AND event_id > 0 AND act_when < NOW()");
-
- break;
- case 'PENDING';
- $this->whereAdd('event_id = 0 OR (event_id > 0 AND act_when > NOW() )');
- break;
- case 'OPENED';
- $this->whereAdd('is_open > 0');
- break;
+ // event id is empty, and act_when is in the past... not sent yet..
+ return 0; // pending
}
}