Replace obsolete functionality in "PortableContact"

This commit is contained in:
Michael 2019-10-05 23:30:47 +00:00
parent c32fb1547f
commit 8238081d87
6 changed files with 211 additions and 274 deletions

View file

@ -16,11 +16,11 @@ use Friendica\Database\DBA;
use Friendica\Database\PostUpdate;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\GServer;
use Friendica\Model\Nodeinfo;
use Friendica\Model\Photo;
use Friendica\Model\User;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
@ -254,7 +254,7 @@ class CronJobs
return;
}
if (!PortableContact::reachable($contact["url"])) {
if (!GServer::reachable($contact["url"])) {
continue;
}

View file

@ -64,7 +64,7 @@ class DiscoverPoCo
if ($mode == 8) {
if ($param1 != "") {
PortableContact::lastUpdated($param1, true);
GContact::updateFromProbe($param1, true);
}
} elseif ($mode == 7) {
if (!empty($param4)) {
@ -232,7 +232,7 @@ class DiscoverPoCo
continue;
}
// Update the contact
PortableContact::lastUpdated($jj->url);
GContact::updateFromProbe($jj->url);
continue;
}

View file

@ -57,7 +57,7 @@ class GProbe {
}
if (DBA::isResult($r)) {
// Check for accessibility and do a poco discovery
if (PortableContact::lastUpdated($r[0]['url'], true) && ($r[0]["network"] == Protocol::DFRN)) {
if (GContact::updateFromProbe($r[0]['url'], true) && ($r[0]["network"] == Protocol::DFRN)) {
PortableContact::loadWorker(0, 0, $r[0]['id'], str_replace('/profile/', '/poco/', $r[0]['url']));
}
}