$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()",
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;
}
}
*/
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;
}