From: Michael Date: Fri, 20 Dec 2019 21:27:49 +0000 (+0000) Subject: Fix some errors X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ef9bdfdff2083b616596221c372444d866ea7f48;p=friendica.git Fix some errors --- diff --git a/src/Worker/DiscoverContacts.php b/src/Worker/DiscoverContacts.php index 88023bccc2..7af170b3b4 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 df87b20dcb..e2621073a5 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 a8248db458..4d288f8fe2 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; }