NULL_DATE is now a constant

This commit is contained in:
Michael 2017-02-27 23:37:15 +00:00
parent 86c6c48bd8
commit 0afb0c2ea4
21 changed files with 162 additions and 146 deletions

View file

@ -152,7 +152,7 @@ function onepoll_run(&$argv, &$argc){
logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['name']}, CONTACT: {$contact['name']}");
$last_update = (($contact['last-update'] === '0000-00-00 00:00:00')
$last_update = (($contact['last-update'] <= NULL_DATE)
? datetime_convert('UTC','UTC','now - 7 days', ATOM_TIME)
: datetime_convert('UTC','UTC',$contact['last-update'], ATOM_TIME)
);
@ -250,7 +250,7 @@ function onepoll_run(&$argv, &$argc){
mark_for_death($contact);
}
else {
if($contact['term-date'] != '0000-00-00 00:00:00') {
if ($contact['term-date'] > NULL_DATE) {
logger("poller: $url back from the dead - removing mark for death");
unmark_for_death($contact);
}