]> git.mxchange.org Git - friendica.git/commitdiff
Changed default value
authorMichael <heluecht@pirati.ca>
Wed, 15 Jul 2020 17:29:52 +0000 (17:29 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 15 Jul 2020 17:29:52 +0000 (17:29 +0000)
mod/common.php
mod/display.php
mod/suggest.php
src/Core/Search.php
src/Model/Contact.php
src/Model/GContact.php
src/Module/AllFriends.php
src/Module/Contact/Hovercard.php
src/Module/Profile/Contacts.php
src/Protocol/DFRN.php

index 9b327f1bf81b149f091f50611eba2a08add2b894..9231d090b8d35608b120e0c967d86ebd4bea1fd3 100644 (file)
@@ -124,7 +124,7 @@ function common_content(App $a)
        $entries = [];
        foreach ($common_friends as $common_friend) {
                //get further details of the contact
-               $contact_details = Model\Contact::getByURLForUser($common_friend['url'], $uid, false);
+               $contact_details = Model\Contact::getByURLForUser($common_friend['url'], $uid);
 
                // $rr['id'] is needed to use contact_photo_menu()
                /// @TODO Adding '/" here avoids E_NOTICE on missing constants
index ddc78d6eae024df2724a31dd3d7c4aa442584004..61e1529e4dff6493ac25f9daea56aa966a914fcb 100644 (file)
@@ -164,7 +164,7 @@ function display_fetchauthor($a, $item)
                $profiledata["about"] = "";
        }
 
-       $profiledata = array_merge($profiledata, Contact::getByURLForUser($profiledata["url"], local_user(), false));
+       $profiledata = array_merge($profiledata, Contact::getByURLForUser($profiledata["url"], local_user()));
 
        if (!empty($profiledata["photo"])) {
                $profiledata["photo"] = DI::baseUrl()->remove($profiledata["photo"]);
index 2b7b1f67437c462bac72b8ecd84192cdd9241a95..068b9e366bd81c1465177df45c577ea28060b182 100644 (file)
@@ -104,7 +104,7 @@ function suggest_content(App $a)
                        'hide' => [DI::l10n()->t('Ignore/Hide'), $ignlnk]
                ];
 
-               $contact_details = array_merge($rr, Contact::getByURLForUser($rr["url"], local_user(), false));
+               $contact_details = array_merge($rr, Contact::getByURLForUser($rr["url"], local_user()));
 
                $entry = [
                        'url' => Contact::magicLink($rr['url']),
index 208633272b3722be83e78837f69bcf10197ac121..d6ed9b6bfb362499a9cd6afbeaa4a03325a3516e 100644 (file)
@@ -77,7 +77,7 @@ class Search
                        // Ensure that we do have a contact entry
                        Contact::getIdForURL($user_data['url'] ?? '');
 
-                       $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', local_user(), false);
+                       $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', local_user());
 
                        $result = new ContactResult(
                                $user_data['name'] ?? '',
@@ -143,7 +143,7 @@ class Search
 
                foreach ($profiles as $profile) {
                        $profile_url = $profile['url'] ?? '';
-                       $contactDetails = Contact::getByURLForUser($profile_url, local_user(), false);
+                       $contactDetails = Contact::getByURLForUser($profile_url, local_user());
 
                        $result = new ContactResult(
                                $profile['name'] ?? '',
@@ -232,7 +232,7 @@ class Search
                                continue;
                        }
 
-                       $contact = Contact::getByURLForUser($row["nurl"], local_user(), false);
+                       $contact = Contact::getByURLForUser($row["nurl"], local_user());
 
                        if ($contact["name"] == "") {
                                $contact["name"] = end(explode("/", $urlParts["path"]));
index afec920070d02f5149113e4322698fea4f5f276e..15e4e57035c3f3ecb255e80a2d978efb010e9aec 100644 (file)
@@ -238,7 +238,7 @@ class Contact
         * @param boolean $update true = always update, false = never update, null = update when not found or outdated
         * @return array contact array
         */
-       public static function getByURLForUser(string $url, int $uid = 0, $update = null, array $fields = [])
+       public static function getByURLForUser(string $url, int $uid = 0, $update = false, array $fields = [])
        {
                if ($uid != 0) {
                        $contact = self::getByURL($url, $update, $fields, $uid);
index e8cd4768a65ae20f784116c17ba0283492f8db0e..5ef74dcf7756d484cbc5cf0d412ebae5820bb234 100644 (file)
@@ -111,7 +111,7 @@ class GContact
                                continue;
                        }
 
-                       $gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user(), false);
+                       $gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user());
                }
                DBA::close($results);
                return $gcontacts;
index d2d2b3b0cf627a3b06057ae99e4c35ac3eed9f04..2932930627b05f11278e0ef7f8362e440edf4276 100644 (file)
@@ -79,7 +79,7 @@ class AllFriends extends BaseModule
                $entries = [];
                foreach ($friends as $friend) {
                        //get further details of the contact
-                       $contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid, false));
+                       $contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid));
 
                        $connlnk = '';
                        // $friend[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photoMenu
index 29329b22964ed5f4e9e6cdee18db63929780c5d9..750b856bc301dea0c05563a58153cc8082053b6e 100644 (file)
@@ -65,7 +65,7 @@ class Hovercard extends BaseModule
                // Search for contact data
                // Look if the local user has got the contact
                if (Session::isAuthenticated()) {
-                       $contact = Contact::getByURLForUser($contact_url, local_user(), false);
+                       $contact = Contact::getByURLForUser($contact_url, local_user());
                } else {
                        $contact = Contact::getByURL($contact_url, false);
                }
index 60ba2b92e48595ce90d774f50b31ed598c4fa9cb..508fe376246b44013809133163a7317b6f0cdee7 100644 (file)
@@ -103,7 +103,7 @@ class Contacts extends BaseProfile
                                continue;
                        }
 
-                       $contact_details = array_merge($contact, Contact::getByURLForUser($contact['url'], $a->profile['uid'], false));
+                       $contact_details = array_merge($contact, Contact::getByURLForUser($contact['url'], $a->profile['uid']));
 
                        $contacts[] = [
                                'id'           => $contact['id'],
index c9a76fef096edfe8272dd50df9f2da5bb7b9b0c6..b7c3204b796de9c01281320b9d6e61d2e6dc313d 100644 (file)
@@ -755,7 +755,7 @@ class DFRN
        {
                $author = $doc->createElement($element);
 
-               $contact = Contact::getByURLForUser($contact_url, $item["uid"], null, ['url', 'name', 'addr', 'photo']);
+               $contact = Contact::getByURLForUser($contact_url, $item["uid"], false, ['url', 'name', 'addr', 'photo']);
                if (!empty($contact)) {
                        XML::addElement($doc, $author, "name", $contact["name"]);
                        XML::addElement($doc, $author, "uri", $contact["url"]);