X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fredir.php;h=4c687e40d328ac88facd3fe9ab19f9bc487f0edb;hb=831fff0f5c4497ccb14a9e1cb3299136f5682a3d;hp=6083117b4064a1bbaf72cb9ca38dcd56522a468a;hpb=3c76826793feeb933dab7a07dab7cc7eb2efc451;p=friendica.git diff --git a/mod/redir.php b/mod/redir.php index 6083117b40..4c687e40d3 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -137,9 +137,9 @@ function redir_magic($a, $cid, $url) // Shouldn't happen under normal conditions notice(L10n::t('Contact not found.')); if (!empty($url)) { - $a->redirect($url); + System::externalRedirect($url); } else { - $a->internalRedirect(); + DI::baseUrl()->redirect(); } } else { $contact_url = $contact['url']; @@ -149,9 +149,9 @@ function redir_magic($a, $cid, $url) $basepath = Contact::getBasepath($contact_url); // We don't use magic auth when there is no visitor, we are on the same system or we visit our own stuff - if (empty($visitor) || Strings::compareLink($basepath, System::baseUrl()) || Strings::compareLink($contact_url, $visitor)) { + if (empty($visitor) || Strings::compareLink($basepath, DI::baseUrl()) || Strings::compareLink($contact_url, $visitor)) { Logger::info('Redirecting without magic', ['target' => $target_url, 'visitor' => $visitor, 'contact' => $contact_url]); - $a->redirect($target_url); + System::externalRedirect($target_url); } // Test for magic auth on the target system @@ -161,7 +161,7 @@ function redir_magic($a, $cid, $url) $target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url); Logger::info('Redirecting with magic', ['target' => $target_url, 'visitor' => $visitor, 'contact' => $contact_url]); - $a->redirect($target_url); + System::externalRedirect($target_url); } else { Logger::info('No magic for contact', ['contact' => $contact_url]); }