Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect()
This commit is contained in:
@@ -25,10 +25,8 @@ class Login extends BaseModule
|
||||
{
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
if (local_user()) {
|
||||
$a->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
return self::form(Session::get('return_path'), intval(Config::get('config', 'register_policy')) !== \Friendica\Module\Register::CLOSED);
|
||||
|
||||
@@ -40,7 +40,7 @@ class Logout extends BaseModule
|
||||
System::externalRedirect($visitor_home);
|
||||
} else {
|
||||
info(L10n::t('Logged out.'));
|
||||
DI::app()->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,12 @@ class Recovery extends BaseModule
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
DI::app()->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
// Already authenticated with 2FA token
|
||||
if (Session::get('2fa')) {
|
||||
DI::app()->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('twofactor/recovery.tpl'), [
|
||||
|
||||
@@ -50,12 +50,12 @@ class Verify extends BaseModule
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
if (!local_user()) {
|
||||
DI::app()->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
// Already authenticated with 2FA token
|
||||
if (Session::get('2fa')) {
|
||||
DI::app()->internalRedirect();
|
||||
DI::baseUrl()->redirect();
|
||||
}
|
||||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('twofactor/verify.tpl'), [
|
||||
|
||||
Reference in New Issue
Block a user