Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-07-18 10:34:02 +0300
committerJoas Schilling <coding@schilljs.com>2019-07-18 10:38:42 +0300
commit7a18325829ba8e83159be2bb8ef31b8e70872845 (patch)
treeb6fa252114f869a09ca409f3ceab56e1b761d023 /lib
parent947847c14a706bc15552ff11ae41afa00e7b6da5 (diff)
Fall back to default_language
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/EndpointController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Controller/EndpointController.php b/lib/Controller/EndpointController.php
index 4f60c87..97c657a 100644
--- a/lib/Controller/EndpointController.php
+++ b/lib/Controller/EndpointController.php
@@ -90,6 +90,7 @@ class EndpointController extends OCSController {
$filter = $this->manager->createNotification();
$filter->setUser($this->getCurrentUser());
$language = $this->config->getUserValue($this->getCurrentUser(), 'core', 'lang', null);
+ $language = $language ?? $this->config->getSystemValue('default_language', 'en');
$notifications = $this->handler->get($filter);
@@ -140,6 +141,7 @@ class EndpointController extends OCSController {
}
$language = $this->config->getUserValue($this->getCurrentUser(), 'core', 'lang', null);
+ $language = $language ?? $this->config->getSystemValue('default_language', 'en');
try {
$notification = $this->manager->prepare($notification, $language);