aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Poller.php
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-26 18:17:38 -0700
committerredmatrix <mike@macgirvin.com>2016-09-26 18:17:38 -0700
commit4663278f52fd11c1014d13151af2bc6ef1392c7d (patch)
tree5ea36ed7db723a1d0abfd99c5e7d21f9e72cf12a /Zotlabs/Daemon/Poller.php
parent5716556766eb4e329f0c6c1bc899a7621cbcd5a5 (diff)
parentcacdac16aa104eb1308f69f24fef31f682934fca (diff)
downloadvolse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.tar.gz
volse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.tar.bz2
volse-hubzilla-4663278f52fd11c1014d13151af2bc6ef1392c7d.zip
Merge branch 'nulldate' into dev
Diffstat (limited to 'Zotlabs/Daemon/Poller.php')
-rw-r--r--Zotlabs/Daemon/Poller.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php
index 75efbf8f7..e4bc9c143 100644
--- a/Zotlabs/Daemon/Poller.php
+++ b/Zotlabs/Daemon/Poller.php
@@ -117,7 +117,7 @@ class Poller {
// if we've never connected with them, start the mark for death countdown from now
- if($c == NULL_DATE) {
+ if($c <= NULL_DATE) {
$r = q("update abook set abook_connected = '%s' where abook_id = %d",
dbesc(datetime_convert()),
intval($contact['abook_id'])
@@ -171,7 +171,7 @@ class Poller {
}
if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) {
- $r = q("SELECT u.ud_addr, u.ud_id, u.ud_last FROM updates AS u INNER JOIN (SELECT ud_addr, max(ud_id) AS ud_id FROM updates WHERE ( ud_flags & %d ) = 0 AND ud_addr != '' AND ( ud_last = '%s' OR ud_last > %s - INTERVAL %s ) GROUP BY ud_addr) AS s ON s.ud_id = u.ud_id ",
+ $r = q("SELECT u.ud_addr, u.ud_id, u.ud_last FROM updates AS u INNER JOIN (SELECT ud_addr, max(ud_id) AS ud_id FROM updates WHERE ( ud_flags & %d ) = 0 AND ud_addr != '' AND ( ud_last <= '%s' OR ud_last > %s - INTERVAL %s ) GROUP BY ud_addr) AS s ON s.ud_id = u.ud_id ",
intval(UPDATE_FLAGS_UPDATED),
dbesc(NULL_DATE),
db_utcnow(), db_quoteinterval('7 DAY')
@@ -182,7 +182,7 @@ class Poller {
// If they didn't respond when we attempted before, back off to once a day
// After 7 days we won't bother anymore
- if($rr['ud_last'] != NULL_DATE)
+ if($rr['ud_last'] > NULL_DATE)
if($rr['ud_last'] > datetime_convert('UTC','UTC', 'now - 1 day'))
continue;
Master::Summon(array('Onedirsync',$rr['ud_id']));