Fix some errors

This commit is contained in:
Michael 2019-12-20 21:27:49 +00:00
parent 3c4f44a4ab
commit ef9bdfdff2
3 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ class DiscoverContacts
$starttime = time(); $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 WHERE `last_contact` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND
`last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND `last_failure` < UTC_TIMESTAMP - INTERVAL 1 MONTH AND
`network` IN (?, ?, ?, ?, '') ORDER BY rand()", `network` IN (?, ?, ?, ?, '') ORDER BY rand()",

View file

@ -7,12 +7,12 @@ namespace Friendica\Worker;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Protocol\PortableContact; use Friendica\Protocol\PortableContact;
class UpdateServerDirectory.php class UpdateServerDirectory
{ {
// Discover the given server id for their contacts // Discover the given server id for their contacts
public static function execute($gserverid) public static function execute($gserverid)
{ {
PortableContact::discoverSingleServer(gserverid); PortableContact::discoverSingleServer($gserverid);
return; return;
} }
} }

View file

@ -17,7 +17,7 @@ class UpdateServers
*/ */
public static function execute() 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)) { if (!DBA::isResult($gservers)) {
return; return;
} }