diff options
author | Habeas Codice <habeascodice@federated.social> | 2015-01-22 09:25:34 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2015-01-22 09:25:34 -0800 |
commit | 9d9be768c53bebbc8e339704d74b3e6e78700d5a (patch) | |
tree | 3c5c79b2b5e30e0ad160a2d59ab5c0fdf90f528c /include/poller.php | |
parent | c05f0ec40784a17de2e675c4d684d3a0c54228b0 (diff) | |
download | volse-hubzilla-9d9be768c53bebbc8e339704d74b3e6e78700d5a.tar.gz volse-hubzilla-9d9be768c53bebbc8e339704d74b3e6e78700d5a.tar.bz2 volse-hubzilla-9d9be768c53bebbc8e339704d74b3e6e78700d5a.zip |
fix dir server query take 2
rationale: use latest entry rather than latest update. update timestamp is updated for all entries upon success so they
are equivalent. prevents dupes from fake null dates.
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/poller.php b/include/poller.php index 61b0881f4..d78355db1 100644 --- a/include/poller.php +++ b/include/poller.php @@ -389,7 +389,7 @@ function poller_run($argv, $argc){ } 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_last) AS ud_last 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_addr = u.ud_addr AND s.ud_last = u.ud_last ", + $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') |