Remove DI::app() dependency again

This commit is contained in:
nupplaPhil
2020-02-01 23:34:50 +01:00
parent 0b309245b1
commit 97e708f2e2
5 changed files with 8 additions and 8 deletions

View File

@@ -264,7 +264,7 @@ class Update
$body = $l10n->t("The error message is\n[pre]%s[/pre]", $error_message);
$email = DI::emailer()
->newSystemMail(DI::app(), $l10n)
->newSystemMail($l10n)
->withMessage($l10n->t('[Friendica Notify] Database update'), $preamble, $body)
->forUser($admin['uid'] ?? 0)
->withRecipient($admin['email'])
@@ -300,7 +300,7 @@ class Update
$from_build, $to_build));
$email = DI::emailer()
->newSystemMail(DI::app(), $l10n)
->newSystemMail($l10n)
->withMessage($l10n->t('[Friendica Notify] Database update'), $preamble)
->forUser($admin['uid'] ?? 0)
->withRecipient($admin['email'])

View File

@@ -898,7 +898,7 @@ class User
));
$email = DI::emailer()
->newSystemMail(DI::app(), DI::l10n())
->newSystemMail(DI::l10n())
->withMessage(DI::l10n()->t('Registration at %s', $sitename), $body)
->forUser($user['uid'] ?? 0)
->withRecipient($user['email'])
@@ -966,7 +966,7 @@ class User
));
$email = DI::emailer()
->newSystemMail(DI::app(), $l10n)
->newSystemMail($l10n)
->withMessage(DI::l10n()->t('Registration details for %s', $sitename), $preamble, $body)
->forUser($user['uid'] ?? 0)
->withRecipient($user['email'])

View File

@@ -77,7 +77,7 @@ class Users extends BaseAdmin
$body = sprintf($body, DI::baseUrl()->get(), $user['nickname'], $result['password'], DI::config()->get('config', 'sitename'));
$email = DI::emailer()
->newSystemMail(DI::app(), (!empty($user['language'])) ? DI::l10n()->withLang($user['language']) : DI::l10n())
->newSystemMail((!empty($user['language'])) ? DI::l10n()->withLang($user['language']) : DI::l10n())
->withMessage(DI::l10n()->t('Registration details for %s', DI::config()->get('config', 'sitename')), $preamble, $body)
->forUser($user['uid'] ?? 0)
->withRecipient($user['email'])