X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FOnePoll.php;h=2d36ee8f47c49efdb91b42e6545b1dc470f0b868;hb=82f713cb7fbc45f108e811a425c81c11c3b094d2;hp=86da2791c2e9ccc715891bb5880d36e29a94d8cf;hpb=fe0339dabee4333355d96b700849bbdadf97ea06;p=friendica.git diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index 86da2791c2..2d36ee8f47 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -30,11 +30,7 @@ class OnePoll Logger::log('Start for contact ' . $contact_id); - $manual_id = 0; - $generation = 0; - $hub_update = false; $force = false; - $restart = false; if ($command == "force") { $force = true; @@ -45,7 +41,6 @@ class OnePoll return; } - $d = DateTimeFormat::utcNow(); $contact = DBA::selectFirst('contact', [], ['id' => $contact_id]); if (!DBA::isResult($contact)) { @@ -106,7 +101,7 @@ class OnePoll if (in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::DFRN])) { $updated = DateTimeFormat::utcNow(); // Currently we can't check every AP implementation, so we don't do it at all - if (($contact['network' != Protocol::ACTIVITYPUB]) && !PortableContact::reachable($contact['url'])) { + if (($contact['network'] != Protocol::ACTIVITYPUB) && !PortableContact::reachable($contact['url'])) { Logger::log("Skipping probably dead contact ".$contact['url']); // set the last-update so we don't keep polling @@ -580,7 +575,7 @@ class OnePoll $datarray['allow_cid'] = '<' . $contact['id'] . '>'; } - $stored_item = Item::insert($datarray); + Item::insert($datarray); switch ($mailconf['action']) { case 0: @@ -698,7 +693,8 @@ class OnePoll * @brief Updates a personal contact entry and the public contact entry * * @param array $contact The personal contact entry - * @param array $fields The fields that are updated + * @param array $fields The fields that are updated + * @throws \Exception */ private static function updateContact(array $contact, array $fields) {