]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Issue 9231: Speed up full text search
[friendica.git] / src / Model / Profile.php
index 2fcbde0779e8d98b72d0ff8b58c2ccd2f3fcf069..0ed393022b3f7ea108c6ca40d03fcfe1949990a0 100644 (file)
@@ -166,7 +166,7 @@ class Profile
                        }
                }
 
-               $profile = self::getByNickname($nickname, $user['uid']);
+               $profile = User::getOwnerDataById($user['uid'], false);
 
                if (empty($profile) && empty($profiledata)) {
                        Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG);
@@ -354,13 +354,7 @@ class Profile
                // Fetch the account type
                $account_type = Contact::getAccountType($profile);
 
-               if (!empty($profile['address'])
-                       || !empty($profile['location'])
-                       || !empty($profile['locality'])
-                       || !empty($profile['region'])
-                       || !empty($profile['postal-code'])
-                       || !empty($profile['country-name'])
-               ) {
+               if (!empty($profile['address']) || !empty($profile['location'])) {
                        $location = DI::l10n()->t('Location:');
                }
 
@@ -427,10 +421,6 @@ class Profile
                        $p['about'] = BBCode::convert($p['about']);
                }
 
-               if (empty($p['address']) && !empty($p['location'])) {
-                       $p['address'] = $p['location'];
-               }
-
                if (isset($p['address'])) {
                        $p['address'] = BBCode::convert($p['address']);
                }
@@ -737,7 +727,7 @@ class Profile
                        $magic_path = $basepath . '/magic' . '?owa=1&dest=' . $dest . '&' . $addr_request;
 
                        // We have to check if the remote server does understand /magic without invoking something
-                       $serverret = Network::curl($basepath . '/magic');
+                       $serverret = DI::httpRequest()->get($basepath . '/magic');
                        if ($serverret->isSuccess()) {
                                Logger::log('Doing magic auth for visitor ' . $my_url . ' to ' . $magic_path, Logger::DEBUG);
                                System::externalRedirect($magic_path);