Skip to content

Commit

Permalink
Fixes #37039 - use default_language as default
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Mar 2, 2020
1 parent 8382368 commit a3e1d2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/unreleased/37039
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Change: Respect default_language when sending email notifications

https://github.com/owncloud/core/issues/37039
3 changes: 2 additions & 1 deletion lib/private/Share/MailNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ public function sendInternalShareMail($sender, $node, $shareType, $recipientList
$unescapedFilename = $filename;
$link = $filter->getLink();

$recipientLanguageCode = $this->config->getUserValue($recipient->getUID(), 'core', 'lang', 'en');
$defaultLang = $this->config->getSystemValue('default_language', 'en');
$recipientLanguageCode = $this->config->getUserValue($recipient->getUID(), 'core', 'lang', $defaultLang);
$recipientL10N = \OC::$server->getL10N('lib');
if ($this->l->getLanguageCode() !== $recipientLanguageCode) {
$recipientL10N = \OC::$server->getL10N('lib', $recipientLanguageCode);
Expand Down

0 comments on commit a3e1d2a

Please sign in to comment.