$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);
}
}
- $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname());
+ $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->getHostName());
$frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host;
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);
}
}
* @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']]);