]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/OnePoll.php
Merge pull request #5862 from nupplaphil/rename_App_Methods
[friendica.git] / src / Worker / OnePoll.php
index 7f60ddc56898bbd754f139453f33367532f12f24..21e3b44b3e7345ba98c79361c8f5e92902c6d567 100644 (file)
@@ -196,7 +196,7 @@ class OnePoll
 
                        $handshake_xml = $ret['body'];
 
-                       $html_code = $a->get_curl_code();
+                       $html_code = Network::getCurl()->getCode();
 
                        logger('handshake with url ' . $url . ' returns xml: ' . $handshake_xml, LOGGER_DATA);
 
@@ -507,7 +507,7 @@ class OnePoll
                                                                }
                                                        }
 
-                                                       $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname());
+                                                       $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->getHostName());
 
                                                        $frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host;
 
@@ -607,12 +607,15 @@ class OnePoll
                        if (strlen($hub) && $hub_update && (($contact['rel'] != Contact::FOLLOWER) || $contact['network'] == Protocol::FEED)) {
                                logger('hub ' . $hubmode . ' : ' . $hub . ' contact name : ' . $contact['name'] . ' local user : ' . $importer['name']);
                                $hubs = explode(',', $hub);
+
                                if (count($hubs)) {
                                        foreach ($hubs as $h) {
                                                $h = trim($h);
+
                                                if (!strlen($h)) {
                                                        continue;
                                                }
+
                                                subscribe_to_hub($h, $importer, $contact, $hubmode);
                                        }
                                }
@@ -652,7 +655,7 @@ class OnePoll
         * @param array $contact The personal contact entry
         * @param array $fields The fields that are updated
         */
-       private static function updateContact($contact, $fields)
+       private static function updateContact(array $contact, array $fields)
        {
                DBA::update('contact', $fields, ['id' => $contact['id']]);
                DBA::update('contact', $fields, ['uid' => 0, 'nurl' => $contact['nurl']]);