]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_poll.php
Fetch photo fields, ensuring that they are filled
[friendica.git] / mod / dfrn_poll.php
index 8d50761db18c755134573a7b2b5b5721516d68c8..3d073dc8ead9cf1fa1cc4d5ea856299d74c43d39 100644 (file)
 
 use Friendica\App;
 use Friendica\Core\Logger;
-use Friendica\Core\System;
 use Friendica\Core\Session;
+use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Protocol\DFRN;
 use Friendica\Protocol\OStatus;
-use Friendica\Util\Network;
 use Friendica\Util\Strings;
 use Friendica\Util\XML;
 
@@ -115,7 +114,7 @@ function dfrn_poll_init(App $a)
                );
 
                if (DBA::isResult($r)) {
-                       $s = Network::fetchUrl($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
+                       $s = DI::httpRequest()->fetch($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check');
 
                        Logger::log("dfrn_poll: old profile returns " . $s, Logger::DATA);
 
@@ -133,7 +132,7 @@ function dfrn_poll_init(App $a)
                                        Session::setVisitorsContacts();
 
                                        if (!$quiet) {
-                                               info(DI::l10n()->t('%1$s welcomes %2$s', $r[0]['username'], $r[0]['name']) . EOL);
+                                               info(DI::l10n()->t('%1$s welcomes %2$s', $r[0]['username'], $r[0]['name']));
                                        }
 
                                        // Visitors get 1 day session.
@@ -499,20 +498,20 @@ function dfrn_poll_content(App $a)
 
                        // URL reply
                        if ($dfrn_version < 2.2) {
-                               $s = Network::fetchUrl($r[0]['poll']
-                                       . '?dfrn_id=' . $encrypted_id
-                                       . '&type=profile-check'
-                                       . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
-                                       . '&challenge=' . $challenge
-                                       . '&sec=' . $sec
+                               $s = DI::httpRequest()->fetch($r[0]['poll']
+                                                             . '?dfrn_id=' . $encrypted_id
+                                                             . '&type=profile-check'
+                                                             . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
+                                                             . '&challenge=' . $challenge
+                                                             . '&sec=' . $sec
                                );
                        } else {
-                               $s = Network::post($r[0]['poll'], [
-                                       'dfrn_id' => $encrypted_id,
-                                       'type' => 'profile-check',
+                               $s = DI::httpRequest()->post($r[0]['poll'], [
+                                       'dfrn_id'      => $encrypted_id,
+                                       'type'         => 'profile-check',
                                        'dfrn_version' => DFRN_PROTOCOL_VERSION,
-                                       'challenge' => $challenge,
-                                       'sec' => $sec
+                                       'challenge'    => $challenge,
+                                       'sec'          => $sec
                                ])->getBody();
                        }
 
@@ -536,7 +535,7 @@ function dfrn_poll_content(App $a)
                                        Session::setVisitorsContacts();
 
                                        if (!$quiet) {
-                                               info(DI::l10n()->t('%1$s welcomes %2$s', $r[0]['username'], $r[0]['name']) . EOL);
+                                               info(DI::l10n()->t('%1$s welcomes %2$s', $r[0]['username'], $r[0]['name']));
                                        }
 
                                        // Visitors get 1 day session.