]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
Merge remote-tracking branch 'upstream/develop' into user-contact
[friendica.git] / src / Protocol / Diaspora.php
index 32c0ce0428d9cfed6ad9913fbef29a2ecb3b27ab..b08fa23c2b01c8187bb6e1104919e1a986a8b728 100644 (file)
@@ -1077,7 +1077,7 @@ class Diaspora
 
                Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
 
-               $envelope = DI::httpRequest()->fetch($source_url);
+               $envelope = DI::httpClient()->fetch($source_url);
                if ($envelope) {
                        Logger::log("Envelope was fetched.", Logger::DEBUG);
                        $x = self::verifyMagicEnvelope($envelope);
@@ -1367,7 +1367,7 @@ class Diaspora
                                'notify' => $data['notify'], 'poll' => $data['poll'],
                                'network' => $data['network']];
 
-               DBA::update('contact', $fields, ['addr' => $old_handle]);
+               Contact::update($fields, ['addr' => $old_handle]);
 
                Logger::log('Contacts are updated.');
 
@@ -2129,7 +2129,7 @@ class Diaspora
                        $fields['bd'] = $birthday;
                }
 
-               DBA::update('contact', $fields, ['id' => $contact['id']]);
+               Contact::update($fields, ['id' => $contact['id']]);
 
                Logger::log("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], Logger::DEBUG);
 
@@ -2211,7 +2211,7 @@ class Diaspora
                                return true;
                        } else {
                                Logger::log("Author ".$author." doesn't want to follow us anymore.", Logger::DEBUG);
-                               Contact::removeFollower($importer, $contact);
+                               Contact::removeFollower($contact);
                                return true;
                        }
                }
@@ -3022,7 +3022,7 @@ class Diaspora
                if (!intval(DI::config()->get("system", "diaspora_test"))) {
                        $content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
 
-                       $postResult = DI::httpRequest()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
+                       $postResult = DI::httpClient()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
                        $return_code = $postResult->getReturnCode();
                } else {
                        Logger::log("test_mode");
@@ -3933,7 +3933,7 @@ class Diaspora
                        $dob = '';
 
                        if ($profile['dob'] && ($profile['dob'] > '0000-00-00')) {
-                               list($year, $month, $day) = sscanf($profile['dob'], '%4d-%2d-%2d');
+                               [$year, $month, $day] = sscanf($profile['dob'], '%4d-%2d-%2d');
                                if ($year < 1004) {
                                        $year = 1004;
                                }