]> git.mxchange.org Git - friendica.git/commitdiff
Changed function name
authorMichael <heluecht@pirati.ca>
Mon, 9 Aug 2021 15:29:07 +0000 (15:29 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 9 Aug 2021 15:29:07 +0000 (15:29 +0000)
34 files changed:
include/api.php
mod/display.php
mod/editpost.php
mod/events.php
mod/fbrowser.php
mod/follow.php
mod/message.php
mod/notes.php
mod/ostatus_subscribe.php
mod/photos.php
mod/ping.php
mod/repair_ostatus.php
mod/settings.php
src/App.php
src/App/Page.php
src/BaseModule.php
src/Console/Contact.php
src/Content/Nav.php
src/Factory/Notification/Introduction.php
src/Model/Contact.php
src/Model/Mail.php
src/Module/Contact.php
src/Module/Delegation.php
src/Module/HCard.php
src/Module/Home.php
src/Module/Invite.php
src/Module/NoScrape.php
src/Module/Profile/Schedule.php
src/Module/Settings/Profile/Photo/Crop.php
src/Module/Settings/Profile/Photo/Index.php
src/Module/Settings/UserExport.php
src/Object/EMail/ItemCCEMail.php
src/Worker/AddContact.php
view/theme/vier/theme.php

index e419e3ad2725771efbfdc6f300b17c833dda3201..7b649da7df80530aa4e423e092bd8e86a9e1d6dc 100644 (file)
@@ -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]);
index ad61134e5f5c53beff2b878b14365321b0d70850..7ac4f38ce836cd7a8ee1621cc51c453d4a736708 100644 (file)
@@ -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();
                        }
                }
 
index 5197708b4b7c8f7e2322cc9459c5d034c7f6caf5..e522522e3d5b9d6438474b859b0ba26313c80f13 100644 (file)
@@ -68,7 +68,7 @@ function editpost_content(App $a)
        DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
                '$ispublic' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
-               '$nickname' => $a->getNickname(),
+               '$nickname' => $a->getUserNickname(),
                '$is_mobile' => DI::mode()->isMobile(),
        ]);
 
index 71e14fc86212fbcb19839636ef0f137ef369ce29..25a937632510150ef74c5b4cfa63f26ec058f63c 100644 (file)
@@ -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';
index 2f4b2eef531ddb3e722b335099b38648034a3327..5d086e0bf878a76eddb4f8dc4810c34d7b0e99a9 100644 (file)
@@ -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')
                                ]);
                        }
index d655bc2bfe65270419727d6e3fd33adca074a1af..d7b01e6192f00b1473abade23bb244a26e5b68f2 100644 (file)
@@ -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
index e862a469bdae55262e9eef8f1cd02a2070cad0e5..c8e5f4290410658c144d8e5a412832644a219ce8 100644 (file)
@@ -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']) {
index fd8763b9652ea3278330a90edbac3d80fb0c868a..1c160a2f2e3120005eb455042e2a291e8d3da062 100644 (file)
@@ -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 .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';
index fe8591b2fac3e544463c8485240a980a2daf75bb..9de27f52ed3e92df60704c16c03870389e94b053 100644 (file)
@@ -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 {
index 583183ebb9f957fbe06a4104720a94c7ea17123b..f90a9f3bfc5b121b627729d8f7755b1db6042911 100644 (file)
@@ -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
                }
 
index 61a12a0128ef2e98fe3f772f5ec3b6e71cbde71e..14331b2e7711558ea62a06cd7b1d41889e0afa42 100644 (file)
@@ -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' ",
index 243783779893c71530f67ce6555c3b52b8b9babd..e201e60a4a3861febd18fb65687ea80b1704157a 100644 (file)
@@ -70,7 +70,7 @@ function repair_ostatus_content(App $a) {
 
        $o .= "<p>".DI::l10n()->t("Keep this window open until done.")."</p>";
 
-       Contact::createFromProbe($a->getUserId(), $r[0]["url"]);
+       Contact::createFromProbeForUser($a->getUserId(), $r[0]["url"]);
 
        DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="1; URL=' . DI::baseUrl() . '/repair_ostatus?counter='.$counter.'">';
 
index 63ad55fa98b426010961efed0db82aff5c02de49..5ad884e883c4a980302ee27026964206c5b375c3 100644 (file)
@@ -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'];
index d779a48d6ebf668ba82b6886403e8bd108fc42c3..ff8c059dec76b0712d58090427c9c0ee4bede408 100644 (file)
@@ -166,7 +166,7 @@ class App
         * Fetch the user nick name
         * @return string
         */
-       public function getNickname()
+       public function getUserNickname()
        {
                return $this->nickname;
        }
index 97b70cf5c0940ebe2e477cd499d569d19967e4a0..75107df6da43b312917c2ef817b6223b782ad620 100644 (file)
@@ -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)) {
index f6dbedfa735030b4837bff27dc5a7bc2b2e1a889..28cce09e0757efb2b67637d58d3a9cd6d042c42b 100644 (file)
@@ -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();
index 7a4299c7bda11f0f080c7b569908752b8f90a7bd..ba65c0025176545136733cfd3eff892adbbc170d 100644 (file)
@@ -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']);
index 3504b9e5a30ba8b423a34d353de0fa0a1389d49b..4ed25cdad5e51c36a5f549da300195138ea979da 100644 (file)
@@ -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) {
index 5bbdbd2eb8579f74bc7c8d6c7ff0e59682dcb4f4..a153e5a5665a33d0a190e76648c9234861cca4b6 100644 (file)
@@ -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() ?? '';
        }
 
        /**
index 9e870d505486c0d3266aa3113467e43daf32bf72..c5b10dd8e8baf411ba6c82cf129735bc19adf01c 100644 (file)
@@ -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];
index 7afd9554742f76bbd7e0b6a58e415aafd6cb329b..7b18ac3c3144f8507150d9af63a2d0336fec6335 100644 (file)
@@ -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;
index 9685d090e7a0ef1ef7a5fc0d6d49d4b61eaa1148..4863e71018c58d5248265f98ee4891fb99aca305 100644 (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]);
index 7ee9b4972894f1a1937823341a4646114bef09b7..ac662ecbd090d97c7ed25960f9bdee3dd69fe396 100644 (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'];
index e5547188bb4c7f56b62fa393c52e8a5c5fa6dc1b..c43e3975c3801039616cbd11b5090e8cea6b16a3 100644 (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'];
index 38a881f29667672c99a61a1e92d99981dded6661..76c4736cf1758c9b0401f83042c31ebb6bb7f4c4 100644 (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');
                }
 
index 3b3e56eb45088fb7954f0921663c7fae53f4d593..48926a1fbff841f5c574a54bfca382e66ff5a9af 100644 (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')
index b308ae14c1db1cf9cd3bfe988d2fd7359c560d1b..9c7b9ec8bdbf154f4bfa4f0c784d5dd0cca4f404 100644 (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');
                }
index 5c5581d57066c6acf470baaa9863d5f4b88be5b3..ee468f8157eabcfdfdc341e774200374f0b6b83e 100644 (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()]);
index f90b16f0e99531d3412e3d3d0e77b9e7860df6ed..d6c89e237bce7d7c00539124295fd21da175dae7 100644 (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]);
index 5a7bae168e8d49cfe5bc6718178284916496fb59..3b4d33a01bef31abf96232fc197e85612400fd57 100644 (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>'
                        ),
                ]);
index a2a6dc2d2af21d5789cef5a085d2c84dd93e7ab3..fe3dd26905cd620f933af4681fc7182c035f5875 100644 (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;
                        }
index e70625bb9647ee49f6edc56b0466570c9b719791..ddaf7660805afff24076d64b00a762a02d7189ba 100644 (file)
@@ -41,14 +41,14 @@ class ItemCCEMail extends Email
 
                $disclaimer = '<hr />' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $user['username'])
                              . '<br />';
-               $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    = '<a href="' . $baseUrl . '/profile/' . $a->getNickname() . '"><img src="' . $authorThumb . '" alt="' . $user['username'] . '" /></a><br /><br />';
+               $link    = '<a href="' . $baseUrl . '/profile/' . $a->getUserNickname() . '"><img src="' . $authorThumb . '" alt="' . $user['username'] . '" /></a><br /><br />';
                $html    = Item::prepareBody($item);
                $message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';;
 
index 755373fcd019a40a67ff81a00f44baf8b94c5f98..be9ee34663046f040b84ab1cd30e4b1fc67e04dd 100644 (file)
@@ -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]);
        }
 }
index 14a744d5a9a8b26f12c190c1e1a078b8538055af..c810aff1cbc9d9fabb53bb5b49b9d11a17e5bc24 100644 (file)
@@ -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();