From d3255afa662b0249f1899f0549b4ffebb6ac8b21 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sat, 18 Jan 2020 20:54:15 +0100 Subject: [PATCH] Move L10n::withLang() calls to DI::l10n()->withLang() calls --- include/enotify.php | 2 +- mod/regmod.php | 2 +- src/Core/Update.php | 4 ++-- src/Module/Register.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index 3785caab1..ecdd16de1 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -57,7 +57,7 @@ function notification($params) $params['to_email'] = ($params['to_email'] ?? '') ?: $user['email']; // from here on everything is in the recipients language - $l10n = L10n::withLang($params['language']); + $l10n = DI::l10n()->withLang($params['language']); $banner = $l10n->t('Friendica Notification'); $product = FRIENDICA_PLATFORM; diff --git a/mod/regmod.php b/mod/regmod.php index 4cdd03845..4897df67b 100644 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -36,7 +36,7 @@ function user_allow($hash) Worker::add(PRIORITY_LOW, "Directory", $url); } - $l10n = L10n::withLang($register['language']); + $l10n = DI::l10n()->withLang($register['language']); $res = User::sendRegisterOpenEmail( $l10n, diff --git a/src/Core/Update.php b/src/Core/Update.php index 24ca0a797..b416f207a 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -253,7 +253,7 @@ class Update $sent[] = $admin['email']; $lang = (($admin['language'])?$admin['language']:'en'); - $l10n = L10n::withLang($lang); + $l10n = DI::l10n()->withLang($lang); $preamble = Strings::deindent($l10n->t(" The friendica developers released update %s recently, @@ -295,7 +295,7 @@ class Update $sent[] = $admin['email']; $lang = (($admin['language']) ? $admin['language'] : 'en'); - $l10n = L10n::withLang($lang); + $l10n = DI::l10n()->withLang($lang); $preamble = Strings::deindent($l10n->t(" The friendica database was successfully updated from %s to %s.", diff --git a/src/Module/Register.php b/src/Module/Register.php index dfe0a534f..e4343d0f8 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -297,7 +297,7 @@ class Register extends BaseModule // Only send a password mail when the password wasn't manually provided if (empty($_POST['password1']) || empty($_POST['confirm'])) { $res = Model\User::sendRegisterOpenEmail( - L10n::withLang($arr['language']), + DI::l10n()->withLang($arr['language']), $user, Config::get('config', 'sitename'), $base_url,