Last old query replaced in OnePoll.php
This commit is contained in:
parent
d4dc2a129e
commit
7e7acf5763
1 changed files with 2 additions and 8 deletions
|
@ -78,16 +78,10 @@ class OnePoll
|
||||||
|
|
||||||
// load current friends if possible.
|
// load current friends if possible.
|
||||||
if (!empty($contact['poco']) && ($contact['success_update'] > $contact['failure_update'])) {
|
if (!empty($contact['poco']) && ($contact['success_update'] > $contact['failure_update'])) {
|
||||||
$r = q("SELECT count(*) AS total FROM glink
|
if (!DBA::exists('glink', ["`cid` = ? AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY", $contact['id']])) {
|
||||||
WHERE `cid` = %d AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY",
|
|
||||||
intval($contact['id'])
|
|
||||||
);
|
|
||||||
if (DBA::isResult($r)) {
|
|
||||||
if (!$r[0]['total']) {
|
|
||||||
PortableContact::loadWorker($contact['id'], $importer_uid, 0, $contact['poco']);
|
PortableContact::loadWorker($contact['id'], $importer_uid, 0, $contact['poco']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Don't poll if polling is deactivated (But we poll feeds and mails anyway)
|
// Don't poll if polling is deactivated (But we poll feeds and mails anyway)
|
||||||
if (!in_array($protocol, [Protocol::FEED, Protocol::MAIL]) && Config::get('system', 'disable_polling')) {
|
if (!in_array($protocol, [Protocol::FEED, Protocol::MAIL]) && Config::get('system', 'disable_polling')) {
|
||||||
|
|
Loading…
Reference in a new issue