From 7e7acf576354a18fbc1ef566a19e8160c2640be9 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 27 Jun 2019 16:21:23 +0000 Subject: [PATCH] Last old query replaced in OnePoll.php --- src/Worker/OnePoll.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 3dfeacf9d9..13fafe2310 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -78,14 +78,8 @@ class OnePoll // load current friends if possible. if (!empty($contact['poco']) && ($contact['success_update'] > $contact['failure_update'])) { - $r = q("SELECT count(*) AS total FROM glink - 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']); - } + if (!DBA::exists('glink', ["`cid` = ? AND updated > UTC_TIMESTAMP() - INTERVAL 1 DAY", $contact['id']])) { + PortableContact::loadWorker($contact['id'], $importer_uid, 0, $contact['poco']); } } -- 2.39.5