diff options
author | RedMatrix <info@friendica.com> | 2015-01-21 16:07:47 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2015-01-21 16:07:47 +1100 |
commit | c78c1ab4b0fe5194caa4b2879780a905d7053509 (patch) | |
tree | be476c723f7eed84b5d5cdb8089f79811f49b4de /include/poller.php | |
parent | d0258c0da2c76c54edc800d26f559a654f5366f8 (diff) | |
parent | 90fbfb313ee40735f7b8501fb6c5330a06aead5d (diff) | |
download | volse-hubzilla-c78c1ab4b0fe5194caa4b2879780a905d7053509.tar.gz volse-hubzilla-c78c1ab4b0fe5194caa4b2879780a905d7053509.tar.bz2 volse-hubzilla-c78c1ab4b0fe5194caa4b2879780a905d7053509.zip |
Merge pull request #872 from habeascodice/master
Rework directory server update selection query
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 896553a43..61b0881f4 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 distinct ud_addr, updates.* from updates where ( ud_flags & %d ) = 0 and ud_addr != '' and ( ud_last = '%s' OR ud_last > %s - INTERVAL %s ) group by ud_addr ", + $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 ", intval(UPDATE_FLAGS_UPDATED), dbesc(NULL_DATE), db_utcnow(), db_quoteinterval('7 DAY') |