X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FProfile.php;h=a08cdade126493efa1f716a129019ef0e2998317;hb=33674808dcbb2336466c65ed9915bda661076ae6;hp=3f7877c55891ae286d0e82d054ff0d29fe4898ef;hpb=50be94aa5ecdceb10de0d6b4764b8eeca78a826f;p=friendica.git diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 3f7877c558..a08cdade12 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -144,7 +144,7 @@ class Profile $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]); if (!DBA::isResult($user) && empty($profiledata)) { - Logger::log('profile error: ' . $a->query_string, Logger::DEBUG); + Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG); return; } @@ -165,7 +165,7 @@ class Profile $pdata = self::getByNickname($nickname, $user['uid'], $profile); if (empty($pdata) && empty($profiledata)) { - Logger::log('profile error: ' . $a->query_string, Logger::DEBUG); + Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG); return; } @@ -337,7 +337,7 @@ class Profile if (isset($profile['url'])) { $profile_url = $profile['url']; } else { - $profile_url = $a->getBaseURL() . '/profile/' . $profile['nickname']; + $profile_url = DI::baseUrl()->get() . '/profile/' . $profile['nickname']; } $follow_link = null; @@ -571,7 +571,7 @@ class Profile $a = \get_app(); $o = ''; - if (!local_user() || $a->is_mobile || $a->is_tablet) { + if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) { return $o; } @@ -668,7 +668,7 @@ class Profile $a = \get_app(); $o = ''; - if (!local_user() || $a->is_mobile || $a->is_tablet) { + if (!local_user() || DI::mode()->isMobile() || DI::mode()->isMobile()) { return $o; } @@ -1047,7 +1047,7 @@ class Profile $addr = $_GET['addr'] ?? $my_url; - $arr = ['zrl' => $my_url, 'url' => $a->cmd]; + $arr = ['zrl' => $my_url, 'url' => DI::args()->getCommand()]; Hook::callAll('zrl_init', $arr); // Try to find the public contact entry of the visitor. @@ -1077,16 +1077,16 @@ class Profile // Remove the "addr" parameter from the destination. It is later added as separate parameter again. $addr_request = 'addr=' . urlencode($addr); - $query = rtrim(str_replace($addr_request, '', $a->query_string), '?&'); + $query = rtrim(str_replace($addr_request, '', DI::args()->getQueryString()), '?&'); // The other instance needs to know where to redirect. - $dest = urlencode($a->getBaseURL() . '/' . $query); + $dest = urlencode(DI::baseUrl()->get() . '/' . $query); // We need to extract the basebath from the profile url // to redirect the visitors '/magic' module. $basepath = Contact::getBasepath($contact['url']); - if ($basepath != $a->getBaseURL() && !strstr($dest, '/magic')) { + if ($basepath != DI::baseUrl()->get() && !strstr($dest, '/magic')) { $magic_path = $basepath . '/magic' . '?owa=1&dest=' . $dest . '&' . $addr_request; // We have to check if the remote server does understand /magic without invoking something @@ -1164,7 +1164,7 @@ class Profile $arr = [ 'visitor' => $visitor, - 'url' => $a->query_string + 'url' => DI::args()->getQueryString() ]; /** * @hooks magic_auth_success