aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
commit426c0341ffff262f58d1b7f031de4f0c53c8bec5 (patch)
treeac61718627051e469d256685cbe1001b2448d926 /lib/private/L10N
parent5063b76c8ac41199c0a0cc088224d4ab0c1ae9b3 (diff)
downloadnextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.tar.gz
nextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.zip
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/L10N')
-rw-r--r--lib/private/L10N/Factory.php12
-rw-r--r--lib/private/L10N/LanguageIterator.php2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 593af02bd1c..1082662933f 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -195,7 +195,7 @@ class Factory implements IFactory {
*
* @link https://github.com/owncloud/core/issues/21955
*/
- if ($this->config->getSystemValue('installed', false)) {
+ if ($this->config->getSystemValueBool('installed', false)) {
$userId = !is_null($this->userSession->getUser()) ? $this->userSession->getUser()->getUID() : null;
if (!is_null($userId)) {
$userLang = $this->config->getUserValue($userId, 'core', 'lang', null);
@@ -247,7 +247,7 @@ class Factory implements IFactory {
}
// Step 3.1: Check if Nextcloud is already installed before we try to access user info
- if (!$this->config->getSystemValue('installed', false)) {
+ if (!$this->config->getSystemValueBool('installed', false)) {
return 'en';
}
// Step 3.2: Check the current user (if any) for their preferred language
@@ -282,7 +282,7 @@ class Factory implements IFactory {
return $forceLocale;
}
- if ($this->config->getSystemValue('installed', false)) {
+ if ($this->config->getSystemValueBool('installed', false)) {
$userId = null !== $this->userSession->getUser() ? $this->userSession->getUser()->getUID() : null;
$userLocale = null;
if (null !== $userId) {
@@ -366,7 +366,7 @@ class Factory implements IFactory {
}
// merge with translations from theme
- $theme = $this->config->getSystemValue('theme');
+ $theme = $this->config->getSystemValueString('theme');
if (!empty($theme)) {
$themeDir = $this->serverRoot . '/themes/' . $theme . substr($dir, strlen($this->serverRoot));
@@ -452,7 +452,7 @@ class Factory implements IFactory {
}
}
- return $this->config->getSystemValue('default_language', 'en');
+ return $this->config->getSystemValueString('default_language', 'en');
}
/**
@@ -576,7 +576,7 @@ class Factory implements IFactory {
}
// merge with translations from theme
- $theme = $this->config->getSystemValue('theme');
+ $theme = $this->config->getSystemValueString('theme');
if (!empty($theme)) {
$transFile = $this->serverRoot . '/themes/' . $theme . substr($transFile, strlen($this->serverRoot));
if (file_exists($transFile)) {
diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php
index b3549782d54..b5f060d7db1 100644
--- a/lib/private/L10N/LanguageIterator.php
+++ b/lib/private/L10N/LanguageIterator.php
@@ -93,7 +93,7 @@ class LanguageIterator implements ILanguageIterator {
$this->next();
// no break
case 4:
- return $this->config->getSystemValue('default_language', 'en');
+ return $this->config->getSystemValueString('default_language', 'en');
/** @noinspection PhpMissingBreakStatementInspection */
case 5:
$defaultLang = $this->config->getSystemValue('default_language', 'en');