Refactor deprecated App::internalRedirect() to DI::baseUrl()->redirect()

This commit is contained in:
nupplaPhil 2019-12-16 00:28:31 +01:00
parent cc9b7bb14f
commit 8e6973b774
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
77 changed files with 263 additions and 259 deletions

View file

@ -238,7 +238,7 @@ class Register extends BaseModule
if ($res) {
\info(L10n::t('Registration successful. Please check your email for further instructions.') . EOL);
$a->internalRedirect();
DI::baseUrl()->redirect();
} else {
\notice(
L10n::t('Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login.',
@ -248,12 +248,12 @@ class Register extends BaseModule
}
} else {
\info(L10n::t('Registration successful.') . EOL);
$a->internalRedirect();
DI::baseUrl()->redirect();
}
} elseif (intval(Config::get('config', 'register_policy')) === self::APPROVE) {
if (!strlen(Config::get('config', 'admin_email'))) {
\notice(L10n::t('Your registration can not be processed.') . EOL);
$a->internalRedirect();
DI::baseUrl()->redirect();
}
// Check if the note to the admin is actually filled out
@ -261,12 +261,12 @@ class Register extends BaseModule
\notice(L10n::t('You have to leave a request note for the admin.')
. L10n::t('Your registration can not be processed.') . EOL);
$a->internalRedirect('register/');
DI::baseUrl()->redirect('register/');
}
// Is there text in the tar pit?
if (!empty($_POST['registertarpit'])) {
\notice(L10n::t('You have entered too much information.'));
$a->internalRedirect('register/');
DI::baseUrl()->redirect('register/');
}
Model\Register::createForApproval($user['uid'], Config::get('system', 'language'), $_POST['permonlybox']);
@ -312,7 +312,7 @@ class Register extends BaseModule
);
\info(L10n::t('Your registration is pending approval by the site owner.') . EOL);
$a->internalRedirect();
DI::baseUrl()->redirect();
}
return;