From: Michael Date: Thu, 27 Jun 2019 16:21:23 +0000 (+0000) Subject: Last old query replaced in OnePoll.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e7acf576354a18fbc1ef566a19e8160c2640be9;p=friendica.git Last old query replaced in OnePoll.php --- 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']); } }