Make L10n immutable
- Remove Push/Pop - Add "withLang($lang)" method
This commit is contained in:
parent
ae0421f321
commit
7a2f4dc54e
7 changed files with 109 additions and 171 deletions
|
@ -38,17 +38,16 @@ function user_allow($hash)
|
|||
Worker::add(PRIORITY_LOW, "Directory", $url);
|
||||
}
|
||||
|
||||
L10n::pushLang($register['language']);
|
||||
$l10n = L10n::withLang($register['language']);
|
||||
|
||||
$res = User::sendRegisterOpenEmail(
|
||||
$l10n,
|
||||
$user,
|
||||
Config::get('config', 'sitename'),
|
||||
$a->getBaseUrl(),
|
||||
($register['password'] ?? '') ?: 'Sent in a previous email'
|
||||
);
|
||||
|
||||
L10n::popLang();
|
||||
|
||||
if ($res) {
|
||||
info(L10n::t('Account approved.') . EOL);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue