]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/OnePoll.php
Merge pull request #6576 from nupplaphil/cache_lock_mock
[friendica.git] / src / Worker / OnePoll.php
index 86da2791c2e9ccc715891bb5880d36e29a94d8cf..2d36ee8f47c49efdb91b42e6545b1dc470f0b868 100644 (file)
@@ -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)
        {