]> git.mxchange.org Git - friendica.git/commitdiff
Remove obsolete profile_id parameter in Model\Profile::load
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 03:01:12 +0000 (22:01 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2020 03:01:12 +0000 (22:01 -0500)
mod/common.php
mod/crepair.php
mod/display.php
mod/follow.php
mod/unfollow.php
src/Model/Profile.php
src/Module/AllFriends.php
src/Module/Contact.php
src/Module/HoverCard.php
src/Module/NoScrape.php

index d2e7baecae2bc4e0e200c51d9061002dcb96adb4..7e1dcc1859f3da99c3cd99e16e1b97482f8fa35f 100644 (file)
@@ -41,7 +41,7 @@ function common_content(App $a)
 
                if (DBA::isResult($contact)) {
                        DI::page()['aside'] = "";
-                       Model\Profile::load($a, "", 0, Model\Contact::getDetailsByURL($contact["url"]));
+                       Model\Profile::load($a, "", Model\Contact::getDetailsByURL($contact["url"]));
                }
        } else {
                $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
index aec1b6047118312149e219a97676417c91941e49..a3caf95e66758f35f4aaa338b13e82f58c81aba4 100644 (file)
@@ -108,7 +108,7 @@ function crepair_content(App $a)
 
        if (DBA::isResult($contact)) {
                $a->data['contact'] = $contact;
-               Model\Profile::load($a, "", 0, Model\Contact::getDetailsByURL($contact["url"]));
+               Model\Profile::load($a, "", Model\Contact::getDetailsByURL($contact["url"]));
        }
 
        $warning = DI::l10n()->t('<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working.');
index 582bcde28e040f0bfddf49f2c8ca4c6f5b09d1bd..6784a20c496740e11db57c1fcfa4611cf0e6f5f7 100644 (file)
@@ -114,7 +114,7 @@ function display_init(App $a)
                }
        }
 
-       Profile::load($a, $nick, 0, $profiledata);
+       Profile::load($a, $nick, $profiledata);
 }
 
 function display_fetchauthor($a, $item)
index 5ab3d3526419c073a2d2020468f5bd8c4d635f37..cdd7b4904e44f5845161aff1641bd7667d21778f 100644 (file)
@@ -192,7 +192,7 @@ function follow_content(App $a)
 
        $profiledata = Contact::getDetailsByURL($ret['url']);
        if ($profiledata) {
-               Profile::load($a, '', 0, $profiledata, false);
+               Profile::load($a, '', $profiledata, false);
        }
 
        if ($gcontact_id <> 0) {
index f64c2a4c961f77d0e0c283461ca9ce8f84d76dcd..0d13c73afc03c380f88108d3d145aaacd348972e 100644 (file)
@@ -141,7 +141,7 @@ function unfollow_content(App $a)
        ]);
 
        DI::page()['aside'] = '';
-       Profile::load($a, '', 0, Contact::getDetailsByURL($contact['url']));
+       Profile::load($a, '', Contact::getDetailsByURL($contact['url']));
 
        $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), ['$title' => DI::l10n()->t('Status Messages and Posts')]);
 
index 18b09225e780cad1e661fa8ee8395a1fac1eed4a..a8f3f6ac6f9daf22bb3577c57eefc1e31b8944f9 100644 (file)
@@ -121,13 +121,12 @@ class Profile
         *
         * @param App     $a
         * @param string  $nickname     string
-        * @param int     $profile_id   int
         * @param array   $profiledata  array
         * @param boolean $show_connect Show connect link
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function load(App $a, $nickname, $profile_id = 0, array $profiledata = [], $show_connect = true)
+       public static function load(App $a, $nickname, array $profiledata = [], $show_connect = true)
        {
                $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]);
 
index 662dc17e4c24c047402f27b8773b9b7b879b80e2..ffb57ccf6f53e118a06d4310db358fba14e58595 100644 (file)
@@ -44,7 +44,7 @@ class AllFriends extends BaseModule
                }
 
                DI::page()['aside'] = "";
-               Model\Profile::load($app, "", 0, Model\Contact::getDetailsByURL($contact["url"]));
+               Model\Profile::load($app, "", Model\Contact::getDetailsByURL($contact["url"]));
 
                $total = Model\GContact::countAllFriends(local_user(), $cid);
 
index d087634e48732a76366ac8a4b02b5dddf90df1d1..7ce47b9cd78e735f38598d27839542446cfecf4f 100644 (file)
@@ -957,7 +957,7 @@ class Contact extends BaseModule
 
                        $profiledata = Model\Contact::getDetailsByURL($contact['url']);
 
-                       Model\Profile::load($a, '', 0, $profiledata, true);
+                       Model\Profile::load($a, '', $profiledata, true);
                        $o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
                }
 
@@ -979,7 +979,7 @@ class Contact extends BaseModule
                                $profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
                        }
 
-                       Model\Profile::load($a, '', 0, $profiledata, true);
+                       Model\Profile::load($a, '', $profiledata, true);
                        $o .= Model\Contact::getPostsFromUrl($contact['url']);
                }
 
index 8f4186b03b1c3593aee0f877bbc6b583cab19834..c2b1d6b46d74d19043705549aa8c0b2547dbc531 100644 (file)
@@ -21,16 +21,14 @@ class HoverCard extends BaseModule
                if ((local_user()) && ($parameters['action'] ?? '') === 'view') {
                        // A logged in user views a profile of a user
                        $nickname = $a->user['nickname'];
-                       $profile  = $parameters['profile'];
                } elseif (empty($parameters['action'])) {
                        // Show the profile hovercard
                        $nickname = $parameters['profile'];
-                       $profile  = 0;
                } else {
                        throw new NotFoundException(DI::l10n()->t('No profile'));
                }
 
-               Profile::load($a, $nickname, $profile);
+               Profile::load($a, $nickname);
 
                $page = DI::page();
 
index 99b55f273d5b3f97aab358b267927632e8899ce0..c8b701e403fd7db2a5070a77bd2b3c0d619e4efe 100644 (file)
@@ -25,17 +25,15 @@ class NoScrape extends BaseModule
                if (isset($parameters['nick'])) {
                        // Get infos about a specific nick (public)
                        $which = $parameters['nick'];
-                       $profile = 0;
                } elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
                        // view infos about a known profile (needs a login)
                        $which   = $a->user['nickname'];
-                       $profile = $parameters['profile'];
                } else {
                        System::jsonError(403, 'Authentication required');
                        exit();
                }
 
-               Profile::load($a, $which, $profile);
+               Profile::load($a, $nickname);
 
                $json_info = [
                        'addr'         => $a->profile['addr'],