Remove obsolete profile_id parameter in Model\Profile::load

This commit is contained in:
Hypolite Petovan 2020-01-27 22:01:12 -05:00
parent 0b8fd92e1e
commit a7dd0173a7
10 changed files with 11 additions and 16 deletions

View 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);

View 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']);
}

View 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();

View 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'],