PortableContact created

Create PortableContact and remove socgraph, update references, and calls
This commit is contained in:
Adam Magness 2017-11-15 10:53:16 -05:00
parent 47db624105
commit 259f91caa9
26 changed files with 266 additions and 219 deletions

View file

@ -1,4 +1,7 @@
<?php
/**
* @file src/Worker/OnePoll.php
*/
namespace Friendica\Worker;
use Friendica\Core\Config;
@ -81,8 +84,8 @@ Class OnePoll
/// @TODO Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
/// @TODO Check whether this is possible with Redmatrix
if ($contact["network"] == NETWORK_DIASPORA) {
if (poco_do_update($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
$last_updated = poco_last_updated($contact["url"]);
if (PortableContact::updateNeeded($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
$last_updated = PortableContact::lastUpdated($contact["url"]);
$updated = datetime_convert();
if ($last_updated) {
$fields = array('last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated);
@ -117,7 +120,7 @@ Class OnePoll
// Update the contact entry
if (($contact['network'] === NETWORK_OSTATUS) || ($contact['network'] === NETWORK_DIASPORA) || ($contact['network'] === NETWORK_DFRN)) {
if (!poco_reachable($contact['url'])) {
if (!PortableContact::reachable($contact['url'])) {
logger("Skipping probably dead contact ".$contact['url']);
return;
}