From ef9bdfdff2083b616596221c372444d866ea7f48 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 20 Dec 2019 21:27:49 +0000 Subject: [PATCH] Fix some errors --- src/Worker/DiscoverContacts.php | 2 +- src/Worker/UpdateServerDirectory.php | 4 ++-- src/Worker/UpdateServers.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Worker/DiscoverContacts.php b/src/Worker/DiscoverContacts.php index 88023bccc..7af170b3b 100644 --- a/src/Worker/DiscoverContacts.php +++ b/src/Worker/DiscoverContacts.php @@ -27,7 +27,7 @@ class DiscoverContacts $starttime = time(); - $contacts = DBA::select("SELECT `url`, `created`, `updated`, `last_failure`, `last_contact`, `server_url`, `network` FROM `gcontact` + $contacts = DBA::p("SELECT `url`, `created`, `updated`, `last_failure`, `last_contact`, `server_url`, `network` FROM `gcontact` WHERE `last_contact` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND `last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND `network` IN (?, ?, ?, ?, '') ORDER BY rand()", diff --git a/src/Worker/UpdateServerDirectory.php b/src/Worker/UpdateServerDirectory.php index df87b20dc..e2621073a 100644 --- a/src/Worker/UpdateServerDirectory.php +++ b/src/Worker/UpdateServerDirectory.php @@ -7,12 +7,12 @@ namespace Friendica\Worker; use Friendica\Core\Logger; use Friendica\Protocol\PortableContact; -class UpdateServerDirectory.php +class UpdateServerDirectory { // Discover the given server id for their contacts public static function execute($gserverid) { - PortableContact::discoverSingleServer(gserverid); + PortableContact::discoverSingleServer($gserverid); return; } } diff --git a/src/Worker/UpdateServers.php b/src/Worker/UpdateServers.php index a8248db45..4d288f8fe 100644 --- a/src/Worker/UpdateServers.php +++ b/src/Worker/UpdateServers.php @@ -17,7 +17,7 @@ class UpdateServers */ public static function execute() { - $gservers = DBA::select("SELECT `url`, `created`, `last_failure`, `last_contact` FROM `gserver` ORDER BY rand()"); + $gservers = DBA::p("SELECT `url`, `created`, `last_failure`, `last_contact` FROM `gserver` ORDER BY rand()"); if (!DBA::isResult($gservers)) { return; }