]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Merge pull request #6009 from vinzv/develop
[friendica.git] / src / Protocol / DFRN.php
index 3a001de0491ca80d06c4c4b087d31c804fca7420..1dcc1197a5d3ae70cc614700ac2fbb1fe89a0212 100644 (file)
@@ -216,7 +216,6 @@ class DFRN
                        }
 
                        $contact = $r[0];
-                       include_once 'include/security.php';
 
                        $set = PermissionSet::get($owner_id, $contact['id']);
 
@@ -647,7 +646,7 @@ class DFRN
                XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
 
                $attributes = ["rel" => "photo", "type" => "image/jpeg",
-                                       "media:width" => 175, "media:height" => 175, "href" => $owner['photo']];
+                                       "media:width" => 300, "media:height" => 300, "href" => $owner['photo']];
 
                if (!$public || !$hidewall) {
                        $attributes["dfrn:updated"] = $picdate;
@@ -1469,16 +1468,17 @@ class DFRN
 
                $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
 
-               $xml = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]);
+               $postResult = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]);
+               $xml = $postResult->getBody();
 
-               $curl_stat = Network::getCurl()->getCode();
+               $curl_stat = $postResult->getReturnCode();
                if (empty($curl_stat) || empty($xml)) {
                        logger('Empty answer from ' . $contact['id'] . ' - ' . $dest_url);
                        Contact::markForArchival($contact);
                        return -9; // timed out
                }
 
-               if (($curl_stat == 503) && (stristr(Network::getCurl()->getHeaders(), 'retry-after'))) {
+               if (($curl_stat == 503) && (stristr($postResult->getHeader(), 'retry-after'))) {
                        Contact::markForArchival($contact);
                        return -10;
                }
@@ -3037,7 +3037,7 @@ class DFRN
 
                        logger('auto_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
                        $dest = (($url) ? '&destination_url=' . $url : '');
-                       goaway($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
+                       System::externalRedirect($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
                                . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest);
                }