mirror of
https://github.com/friendica/friendica
synced 2025-04-21 04:30:11 +00:00
Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect()
This commit is contained in:
parent
cc9b7bb14f
commit
8e6973b774
77 changed files with 263 additions and 259 deletions
|
@ -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'), [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue