From b8fa75b2dd70c3bdc7a4ba2f74d40fd290eaf0e8 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Aug 2021 15:29:07 +0000 Subject: [PATCH] Changed function name --- include/api.php | 2 +- mod/display.php | 2 +- mod/editpost.php | 2 +- mod/events.php | 2 +- mod/fbrowser.php | 6 +++--- mod/follow.php | 2 +- mod/message.php | 8 ++++---- mod/notes.php | 2 +- mod/ostatus_subscribe.php | 2 +- mod/photos.php | 2 +- mod/ping.php | 2 +- mod/repair_ostatus.php | 2 +- mod/settings.php | 2 +- src/App.php | 2 +- src/App/Page.php | 4 ++-- src/BaseModule.php | 4 ++-- src/Console/Contact.php | 2 +- src/Content/Nav.php | 14 +++++++------- src/Factory/Notification/Introduction.php | 2 +- src/Model/Contact.php | 6 +++--- src/Model/Mail.php | 2 +- src/Module/Contact.php | 2 +- src/Module/Delegation.php | 4 ++-- src/Module/HCard.php | 2 +- src/Module/Home.php | 2 +- src/Module/Invite.php | 2 +- src/Module/NoScrape.php | 2 +- src/Module/Profile/Schedule.php | 2 +- src/Module/Settings/Profile/Photo/Crop.php | 4 ++-- src/Module/Settings/Profile/Photo/Index.php | 2 +- src/Module/Settings/UserExport.php | 6 +++--- src/Object/EMail/ItemCCEMail.php | 4 ++-- src/Worker/AddContact.php | 2 +- view/theme/vier/theme.php | 2 +- 34 files changed, 54 insertions(+), 54 deletions(-) diff --git a/include/api.php b/include/api.php index e419e3ad27..7b649da7df 100644 --- a/include/api.php +++ b/include/api.php @@ -322,7 +322,7 @@ function api_call(App $a, App\Arguments $args = null) if (!empty($info['auth']) && api_user() === false) { api_login($a); - Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getNickname()]); + Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getUserNickname()]); } Logger::debug(API_LOG_PREFIX . 'parameters', ['module' => 'api', 'action' => 'call', 'parameters' => $_REQUEST]); diff --git a/mod/display.php b/mod/display.php index ad61134e5f..7ac4f38ce8 100644 --- a/mod/display.php +++ b/mod/display.php @@ -62,7 +62,7 @@ function display_init(App $a) if (local_user()) { $item = Post::selectFirstForUser(local_user(), $fields, ['guid' => DI::args()->getArgv()[1], 'uid' => local_user()]); if (DBA::isResult($item)) { - $nick = $a->getNickname(); + $nick = $a->getUserNickname(); } } diff --git a/mod/editpost.php b/mod/editpost.php index 5197708b4b..e522522e3d 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -68,7 +68,7 @@ function editpost_content(App $a) DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$ispublic' => ' ', // DI::l10n()->t('Visible to everybody'), '$geotag' => $geotag, - '$nickname' => $a->getNickname(), + '$nickname' => $a->getUserNickname(), '$is_mobile' => DI::mode()->isMobile(), ]); diff --git a/mod/events.php b/mod/events.php index 71e14fc862..25a9376325 100644 --- a/mod/events.php +++ b/mod/events.php @@ -280,7 +280,7 @@ function events_content(App $a) $tabs = ''; // tabs if ($a->getThemeInfoValue('events_in_profile')) { - $tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getNickname(), false); + $tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getUserNickname(), false); } $mode = 'view'; diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 2f4b2eef53..5d086e0bf8 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -88,7 +88,7 @@ function fbrowser_content(App $a) } return [ - DI::baseUrl() . '/photos/' . $a->getNickname() . '/image/' . $rr['resource-id'], + DI::baseUrl() . '/photos/' . $a->getUserNickname() . '/image/' . $rr['resource-id'], $filename_e, DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext ]; @@ -103,7 +103,7 @@ function fbrowser_content(App $a) '$folders' => $albums, '$files' => $files, '$cancel' => DI::l10n()->t('Cancel'), - '$nickname' => $a->getNickname(), + '$nickname' => $a->getUserNickname(), '$upload' => DI::l10n()->t('Upload') ]); @@ -132,7 +132,7 @@ function fbrowser_content(App $a) '$folders' => false, '$files' => $files, '$cancel' => DI::l10n()->t('Cancel'), - '$nickname' => $a->getNickname(), + '$nickname' => $a->getUserNickname(), '$upload' => DI::l10n()->t('Upload') ]); } diff --git a/mod/follow.php b/mod/follow.php index d655bc2bfe..d7b01e6192 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -175,7 +175,7 @@ function follow_process(App $a, string $url) { $return_path = 'follow?url=' . urlencode($url); - $result = Contact::createFromProbe($a->getUserId(), $url); + $result = Contact::createFromProbeForUser($a->getUserId(), $url); if ($result['success'] == false) { // Possibly it is a remote item and not an account diff --git a/mod/message.php b/mod/message.php index e862a469bd..c8e5f42904 100644 --- a/mod/message.php +++ b/mod/message.php @@ -112,7 +112,7 @@ function message_content(App $a) return Login::form(); } - $myprofile = DI::baseUrl() . '/profile/' . $a->getNickname(); + $myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname(); $tpl = Renderer::getMarkupTemplate('mail_head.tpl'); if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') { @@ -179,7 +179,7 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$baseurl' => DI::baseUrl()->get(true), - '$nickname' => $a->getNickname(), + '$nickname' => $a->getUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -292,7 +292,7 @@ function message_content(App $a) $tpl = Renderer::getMarkupTemplate('msg-header.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ '$baseurl' => DI::baseUrl()->get(true), - '$nickname' => $a->getNickname(), + '$nickname' => $a->getUserNickname(), '$linkurl' => DI::l10n()->t('Please enter a link URL:') ]); @@ -431,7 +431,7 @@ function render_messages(array $msg, $t) $tpl = Renderer::getMarkupTemplate($t); $rslt = ''; - $myprofile = DI::baseUrl() . '/profile/' . $a->getNickname(); + $myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname(); foreach ($msg as $rr) { if ($rr['unknown']) { diff --git a/mod/notes.php b/mod/notes.php index fd8763b965..1c160a2f2e 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -45,7 +45,7 @@ function notes_content(App $a, $update = false) return; } - $o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getNickname(), false); + $o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getUserNickname(), false); if (!$update) { $o .= '

' . DI::l10n()->t('Personal Notes') . '

'; diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index fe8591b2fa..9de27f52ed 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -111,7 +111,7 @@ function ostatus_subscribe_content(App $a) $probed = Contact::getByURL($url); if (in_array($probed['network'], Protocol::FEDERATED)) { - $result = Contact::createFromProbe($a->getUserId(), $probed['url']); + $result = Contact::createFromProbeForUser($a->getUserId(), $probed['url']); if ($result['success']) { $o .= ' - ' . DI::l10n()->t('success'); } else { diff --git a/mod/photos.php b/mod/photos.php index 583183ebb9..f90a9f3bfc 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -224,7 +224,7 @@ function photos_post(App $a) // Update the photo albums cache Photo::clearAlbumCache($page_owner_uid); - DI::baseUrl()->redirect('photos/' . $a->getNickname() . '/album/' . bin2hex($newalbum)); + DI::baseUrl()->redirect('photos/' . $a->getUserNickname() . '/album/' . bin2hex($newalbum)); return; // NOTREACHED } diff --git a/mod/ping.php b/mod/ping.php index 61a12a0128..14331b2e77 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -193,7 +193,7 @@ function ping_init(App $a) $intro_count = count($intros1) + count($intros2); $intros = $intros1 + $intros2; - $myurl = DI::baseUrl() . '/profile/' . $a->getNickname(); + $myurl = DI::baseUrl() . '/profile/' . $a->getUserNickname(); $mails = q( "SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail` WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ", diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index 2437837798..e201e60a4a 100644 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -70,7 +70,7 @@ function repair_ostatus_content(App $a) { $o .= "

".DI::l10n()->t("Keep this window open until done.")."

"; - Contact::createFromProbe($a->getUserId(), $r[0]["url"]); + Contact::createFromProbeForUser($a->getUserId(), $r[0]["url"]); DI::page()['htmlhead'] = ''; diff --git a/mod/settings.php b/mod/settings.php index 63ad55fa98..5ad884e883 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -594,7 +594,7 @@ function settings_content(App $a) $username = $user['username']; $email = $user['email']; - $nickname = $a->getNickname(); + $nickname = $a->getUserNickname(); $timezone = $user['timezone']; $language = $user['language']; $notify = $user['notify-flags']; diff --git a/src/App.php b/src/App.php index d779a48d6e..ff8c059dec 100644 --- a/src/App.php +++ b/src/App.php @@ -166,7 +166,7 @@ class App * Fetch the user nick name * @return string */ - public function getNickname() + public function getUserNickname() { return $this->nickname; } diff --git a/src/App/Page.php b/src/App/Page.php index 97b70cf5c0..75107df6da 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -277,8 +277,8 @@ class Page implements ArrayAccess // If you're just visiting, let javascript take you home if (!empty($_SESSION['visitor_home'])) { $homebase = $_SESSION['visitor_home']; - } elseif (!empty($app->getNickname())) { - $homebase = 'profile/' . $app->getNickname(); + } elseif (!empty($app->getUserNickname())) { + $homebase = 'profile/' . $app->getUserNickname(); } if (isset($homebase)) { diff --git a/src/BaseModule.php b/src/BaseModule.php index f6dbedfa73..28cce09e07 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -183,7 +183,7 @@ abstract class BaseModule public static function checkFormSecurityTokenRedirectOnError($err_redirect, $typename = '', $formname = 'form_security_token') { if (!self::checkFormSecurityToken($typename, $formname)) { - Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getNickname() . ' - form element ' . $typename); + Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getUserNickname() . ' - form element ' . $typename); Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA); notice(self::getFormSecurityStandardErrorMessage()); DI::baseUrl()->redirect($err_redirect); @@ -193,7 +193,7 @@ abstract class BaseModule public static function checkFormSecurityTokenForbiddenOnError($typename = '', $formname = 'form_security_token') { if (!self::checkFormSecurityToken($typename, $formname)) { - Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getNickname() . ' - form element ' . $typename); + Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getUserNickname() . ' - form element ' . $typename); Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA); throw new \Friendica\Network\HTTPException\ForbiddenException(); diff --git a/src/Console/Contact.php b/src/Console/Contact.php index 7a4299c7bd..ba65c00251 100644 --- a/src/Console/Contact.php +++ b/src/Console/Contact.php @@ -164,7 +164,7 @@ HELP; $network = CliPrompt::prompt(); } - $result = ContactModel::createFromProbe($user['uid'], $url, $network); + $result = ContactModel::createFromProbeForUser($user['uid'], $url, $network); if ($result['success']) { $this->out('User ' . $user['nickname'] . ' now connected to ' . $url . ', contact ID ' . $result['cid']); diff --git a/src/Content/Nav.php b/src/Content/Nav.php index 3504b9e5a3..4ed25cdad5 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -154,7 +154,7 @@ class Nav * Display the current site location as a navigation aid. */ - $myident = !empty($a->getNickname() ? $a->getNickname() . '@' : ''); + $myident = !empty($a->getUserNickname()) ? $a->getUserNickname() . '@' : ''; $sitelocation = $myident . substr(DI::baseUrl()->get($ssl_state), strpos(DI::baseUrl()->get($ssl_state), '//') + 2); @@ -187,10 +187,10 @@ class Nav if ($a->isLoggedIn()) { // user menu - $nav['usermenu'][] = ['profile/' . $a->getNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')]; - $nav['usermenu'][] = ['profile/' . $a->getNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; - $nav['usermenu'][] = ['photos/' . $a->getNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')]; - $nav['usermenu'][] = ['videos/' . $a->getNickname(), DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')]; + $nav['usermenu'][] = ['profile/' . $a->getUserNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')]; + $nav['usermenu'][] = ['profile/' . $a->getUserNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')]; + $nav['usermenu'][] = ['photos/' . $a->getUserNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')]; + $nav['usermenu'][] = ['videos/' . $a->getUserNickname(), DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')]; $nav['usermenu'][] = ['events/', DI::l10n()->t('Events'), '', DI::l10n()->t('Your events')]; $nav['usermenu'][] = ['notes/', DI::l10n()->t('Personal notes'), '', DI::l10n()->t('Your personal notes')]; @@ -267,10 +267,10 @@ class Nav } // The following nav links are only show to logged in users - if (local_user() && !empty($a->getNickname())) { + if (local_user() && !empty($a->getUserNickname())) { $nav['network'] = ['network', DI::l10n()->t('Network'), '', DI::l10n()->t('Conversations from your friends')]; - $nav['home'] = ['profile/' . $a->getNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')]; + $nav['home'] = ['profile/' . $a->getUserNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')]; // Don't show notifications for public communities if (Session::get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) { diff --git a/src/Factory/Notification/Introduction.php b/src/Factory/Notification/Introduction.php index 5bbdbd2eb8..a153e5a566 100644 --- a/src/Factory/Notification/Introduction.php +++ b/src/Factory/Notification/Introduction.php @@ -68,7 +68,7 @@ class Introduction extends BaseFactory $this->l10n = $l10n; $this->pConfig = $pConfig; $this->session = $session; - $this->nick = $app->getNickname() ?? ''; + $this->nick = $app->getUserNickname() ?? ''; } /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 9e870d5054..c5b10dd8e8 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2319,7 +2319,7 @@ class Contact * @throws HTTPException\NotFoundException * @throws \ImagickException */ - public static function createFromProbe(int $uid, $url, $network = '') + public static function createFromProbeForUser(int $uid, $url, $network = '') { $result = ['cid' => -1, 'success' => false, 'message' => '']; @@ -2580,7 +2580,7 @@ class Contact { $contact = self::getById($cid, ['url']); - $result = self::createFromProbe($uid, $contact['url']); + $result = self::createFromProbeForUser($uid, $contact['url']); return $result['cid']; } @@ -2738,7 +2738,7 @@ class Contact } } elseif (DBA::isResult($user) && in_array($user['page-flags'], [User::PAGE_FLAGS_SOAPBOX, User::PAGE_FLAGS_FREELOVE, User::PAGE_FLAGS_COMMUNITY])) { if (($user['page-flags'] == User::PAGE_FLAGS_FREELOVE) && ($network != Protocol::DIASPORA)) { - self::createFromProbe($importer['uid'], $url, $network); + self::createFromProbeForUser($importer['uid'], $url, $network); } $condition = ['uid' => $importer['uid'], 'url' => $url, 'pending' => true]; diff --git a/src/Model/Mail.php b/src/Model/Mail.php index 7afd955474..7b18ac3c31 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -173,7 +173,7 @@ class Mail $recip_host = substr($recip_host, 0, strpos($recip_host, '/')); $recip_handle = (($contact['addr']) ? $contact['addr'] : $contact['nick'] . '@' . $recip_host); - $sender_handle = $a->getNickname() . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3); + $sender_handle = $a->getUserNickname() . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3); $conv_guid = System::createUUID(); $convuri = $recip_handle . ':' . $conv_guid; diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 9685d090e7..4863e71018 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -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]); diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index 7ee9b49728..ac662ecbd0 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -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']; diff --git a/src/Module/HCard.php b/src/Module/HCard.php index e5547188bb..c43e3975c3 100644 --- a/src/Module/HCard.php +++ b/src/Module/HCard.php @@ -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']; diff --git a/src/Module/Home.php b/src/Module/Home.php index 38a881f296..76c4736cf1 100644 --- a/src/Module/Home.php +++ b/src/Module/Home.php @@ -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'); } diff --git a/src/Module/Invite.php b/src/Module/Invite.php index 3b3e56eb45..48926a1fbf 100644 --- a/src/Module/Invite.php +++ b/src/Module/Invite.php @@ -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') diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index b308ae14c1..9c7b9ec8bd 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -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'); } diff --git a/src/Module/Profile/Schedule.php b/src/Module/Profile/Schedule.php index 5c5581d570..ee468f8157 100644 --- a/src/Module/Profile/Schedule.php +++ b/src/Module/Profile/Schedule.php @@ -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()]); diff --git a/src/Module/Settings/Profile/Photo/Crop.php b/src/Module/Settings/Profile/Photo/Crop.php index f90b16f0e9..d6c89e237b 100644 --- a/src/Module/Settings/Profile/Photo/Crop.php +++ b/src/Module/Settings/Profile/Photo/Crop.php @@ -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]); diff --git a/src/Module/Settings/Profile/Photo/Index.php b/src/Module/Settings/Profile/Photo/Index.php index 5a7bae168e..3b4d33a01b 100644 --- a/src/Module/Settings/Profile/Photo/Index.php +++ b/src/Module/Settings/Profile/Photo/Index.php @@ -133,7 +133,7 @@ class Index extends BaseSettings DI::l10n()->t('or'), ($newuser) ? '' . DI::l10n()->t('skip this step') . '' - : '' + : '' . DI::l10n()->t('select a photo from your photo albums') . '' ), ]); diff --git a/src/Module/Settings/UserExport.php b/src/Module/Settings/UserExport.php index a2a6dc2d2a..fe3dd26905 100644 --- a/src/Module/Settings/UserExport.php +++ b/src/Module/Settings/UserExport.php @@ -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; } diff --git a/src/Object/EMail/ItemCCEMail.php b/src/Object/EMail/ItemCCEMail.php index e70625bb96..ddaf766080 100644 --- a/src/Object/EMail/ItemCCEMail.php +++ b/src/Object/EMail/ItemCCEMail.php @@ -41,14 +41,14 @@ class ItemCCEMail extends Email $disclaimer = '
' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $user['username']) . '
'; - $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getNickname()) . EOL; + $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getUserNickname()) . EOL; $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL; if (!$item['title'] == '') { $subject = EmailProtocol::encodeHeader($item['title'], 'UTF-8'); } else { $subject = EmailProtocol::encodeHeader('[Friendica]' . ' ' . $l10n->t('%s posted an update.', $user['username']), 'UTF-8'); } - $link = '' . $user['username'] . '

'; + $link = '' . $user['username'] . '

'; $html = Item::prepareBody($item); $message = '' . $link . $html . $disclaimer . '';; diff --git a/src/Worker/AddContact.php b/src/Worker/AddContact.php index 755373fcd0..be9ee34663 100644 --- a/src/Worker/AddContact.php +++ b/src/Worker/AddContact.php @@ -40,7 +40,7 @@ class AddContact return; } - $result = Contact::createFromProbe($uid, $url); + $result = Contact::createFromProbeForUser($uid, $url); Logger::info('Added contact', ['uid' => $uid, 'url' => $url, 'result' => $result]); } } diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 14a744d5a9..c810aff1cb 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -27,7 +27,7 @@ function vier_init(App $a) $args = DI::args(); - if ($args->get(0) === 'profile' && $args->get(1) === ($a->getNickname() ?? '') || $args->get(0) === 'network' && local_user() + if ($args->get(0) === 'profile' && $args->get(1) === ($a->getUserNickname() ?? '') || $args->get(0) === 'network' && local_user() ) { vier_community_info();