Changed function name

This commit is contained in:
Michael 2021-08-09 15:29:07 +00:00
parent 9f01052dd2
commit b8fa75b2dd
34 changed files with 54 additions and 54 deletions

View file

@ -168,7 +168,7 @@ class Contact extends BaseModule
}
if ($contact['network'] == Protocol::OSTATUS) {
$result = Model\Contact::createFromProbe($contact['uid'], $contact['url'], $contact['network']);
$result = Model\Contact::createFromProbeForUser($contact['uid'], $contact['url'], $contact['network']);
if ($result['success']) {
DBA::update('contact', ['subhub' => 1], ['id' => $contact_id]);

View file

@ -109,7 +109,7 @@ class Delegation extends BaseModule
$ret = [];
Hook::callAll('home_init', $ret);
DI::baseUrl()->redirect('profile/' . DI::app()->getNickname());
DI::baseUrl()->redirect('profile/' . DI::app()->getUserNickname());
// NOTREACHED
}
@ -130,7 +130,7 @@ class Delegation extends BaseModule
$identities[$key]['thumb'] = Contact::getAvatarUrlForId($self['id'], Proxy::SIZE_THUMB, $self['updated']);
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getNickname());
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getUserNickname());
$condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], Notification\Type::INTRO, Notification\Type::MAIL];
$params = ['distinct' => true, 'expression' => 'parent'];

View file

@ -40,7 +40,7 @@ class HCard extends BaseModule
if ((local_user()) && ($parameters['action'] ?? '') === 'view') {
// A logged in user views a profile of a user
$nickname = $a->getNickname();
$nickname = $a->getUserNickname();
} elseif (empty($parameters['action'])) {
// Show the profile hCard
$nickname = $parameters['profile'];

View file

@ -42,7 +42,7 @@ class Home extends BaseModule
Hook::callAll('home_init', $ret);
if (local_user() && ($app->getNickname())) {
if (local_user() && ($app->getUserNickname())) {
DI::baseUrl()->redirect('network');
}

View file

@ -171,7 +171,7 @@ class Invite extends BaseModule
DI::l10n()->t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
. $linkTxt
. "\r\n" . "\r\n" . (($inviteOnly) ? DI::l10n()->t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') . DI::l10n()->t('Once you have registered, please connect with me via my profile page at:')
. "\r\n" . "\r\n" . DI::baseUrl()->get() . '/profile/' . $app->getNickname()
. "\r\n" . "\r\n" . DI::baseUrl()->get() . '/profile/' . $app->getUserNickname()
. "\r\n" . "\r\n" . DI::l10n()->t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n",
],
'$submit' => DI::l10n()->t('Submit')

View file

@ -45,7 +45,7 @@ class NoScrape extends BaseModule
$which = $parameters['nick'];
} elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
// view infos about a known profile (needs a login)
$which = $a->getNickname();
$which = $a->getUserNickname();
} else {
System::jsonError(403, 'Authentication required');
}

View file

@ -58,7 +58,7 @@ class Schedule extends BaseProfile
$a = DI::app();
$o = self::getTabsHTML($a, 'schedule', true, $a->getNickname(), false);
$o = self::getTabsHTML($a, 'schedule', true, $a->getUserNickname(), false);
$schedule = [];
$delayed = DBA::select('delayed-post', [], ['uid' => local_user()]);

View file

@ -56,7 +56,7 @@ class Crop extends BaseSettings
$selectionW = intval($_POST['width'] ?? 0);
$selectionH = intval($_POST['height'] ?? 0);
$path = 'profile/' . DI::app()->getNickname();
$path = 'profile/' . DI::app()->getUserNickname();
$base_image = Photo::selectFirst([], ['resource-id' => $resource_id, 'uid' => local_user(), 'scale' => $scale]);
if (DBA::isResult($base_image)) {
@ -184,7 +184,7 @@ class Crop extends BaseSettings
info(DI::l10n()->t('Profile picture successfully updated.'));
DI::baseUrl()->redirect('profile/' . DI::app()->getNickname());
DI::baseUrl()->redirect('profile/' . DI::app()->getUserNickname());
}
$Image = Photo::getImageForPhoto($photos[0]);

View file

@ -133,7 +133,7 @@ class Index extends BaseSettings
DI::l10n()->t('or'),
($newuser) ?
'<a href="' . DI::baseUrl() . '">' . DI::l10n()->t('skip this step') . '</a>'
: '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getNickname() . '">'
: '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getUserNickname() . '">'
. DI::l10n()->t('select a photo from your photo albums') . '</a>'
),
]);

View file

@ -100,17 +100,17 @@ class UserExport extends BaseSettings
switch ($action) {
case "backup":
header("Content-type: application/json");
header('Content-Disposition: attachment; filename="' . DI::app()->getNickname() . '.' . $action . '"');
header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '.' . $action . '"');
self::exportAll(local_user());
break;
case "account":
header("Content-type: application/json");
header('Content-Disposition: attachment; filename="' . DI::app()->getNickname() . '.' . $action . '"');
header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '.' . $action . '"');
self::exportAccount(local_user());
break;
case "contact":
header("Content-type: application/csv");
header('Content-Disposition: attachment; filename="' . DI::app()->getNickname() . '-contacts.csv' . '"');
header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '-contacts.csv' . '"');
self::exportContactsAsCSV(local_user());
break;
}