X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDFRN.php;h=f213af8db3068299739b33eaf56da5f5253b3b2b;hb=6749b2c887552feef3a671c4063425b11a92014a;hp=21adc58cc05520172d721bc704655333f7ff9f83;hpb=5344efef71f3a2978d50f1cf24771df28afc5aaa;p=friendica.git diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 21adc58cc0..f213af8db3 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -43,7 +43,6 @@ use Friendica\Model\Post\Category; use Friendica\Model\Profile; use Friendica\Model\Tag; use Friendica\Model\User; -use Friendica\Network\HTTPRequest; use Friendica\Network\Probe; use Friendica\Util\Crypto; use Friendica\Util\DateTimeFormat; @@ -1195,7 +1194,7 @@ class DFRN Logger::log('dfrn_deliver: ' . $url); - $curlResult = HTTPRequest::curl($url); + $curlResult = DI::httpRequest()->get($url); if ($curlResult->isTimeout()) { return -2; // timed out @@ -1344,7 +1343,7 @@ class DFRN Logger::debug('dfrn_deliver', ['post' => $postvars]); - $postResult = HTTPRequest::post($contact['notify'], $postvars); + $postResult = DI::httpRequest()->post($contact['notify'], $postvars); $xml = $postResult->getBody(); @@ -1441,7 +1440,7 @@ class DFRN $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json"); - $postResult = HTTPRequest::post($dest_url, $envelope, ["Content-Type: " . $content_type]); + $postResult = DI::httpRequest()->post($dest_url, $envelope, ["Content-Type: " . $content_type]); $xml = $postResult->getBody(); $curl_stat = $postResult->getReturnCode(); @@ -1681,11 +1680,11 @@ class DFRN $condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($contact_old['url'])]; DBA::update('contact', $fields, $condition, true); - Contact::updateAvatar($author['avatar'], $importer['importer_uid'], $contact['id']); + Contact::updateAvatar($contact['id'], $author['avatar']); $pcid = Contact::getIdForURL($contact_old['url']); if (!empty($pcid)) { - Contact::updateAvatar($author['avatar'], 0, $pcid); + Contact::updateAvatar($pcid, $author['avatar']); } /* @@ -1963,7 +1962,7 @@ class DFRN DBA::update('contact', $fields, $condition); - Contact::updateAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true); + Contact::updateAvatar($importer["id"], $relocate["avatar"], true); Logger::log('Contacts are updated.');