mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #54082 from nextcloud/fix/54080/using-userconfig-to-set-lang
This commit is contained in:
commit
41a47f878c
5 changed files with 7 additions and 48 deletions
|
|
@ -22,6 +22,8 @@ use OCP\Config\ValueType;
|
|||
class ConfigLexicon implements ILexicon {
|
||||
public const SHAREAPI_ALLOW_FEDERATION_ON_PUBLIC_SHARES = 'shareapi_allow_federation_on_public_shares';
|
||||
public const SHARE_CUSTOM_TOKEN = 'shareapi_allow_custom_tokens';
|
||||
public const USER_LANGUAGE = 'lang';
|
||||
public const LASTCRON_TIMESTAMP = 'lastcron';
|
||||
|
||||
public function getStrictness(): Strictness {
|
||||
return Strictness::IGNORE;
|
||||
|
|
@ -47,10 +49,13 @@ class ConfigLexicon implements ILexicon {
|
|||
lazy: true,
|
||||
note: 'Shares with guessable tokens may be accessed easily. Shares with custom tokens will continue to be accessible after this setting has been disabled.',
|
||||
),
|
||||
new Entry(self::LASTCRON_TIMESTAMP, ValueType::INT, 0, 'timestamp of last cron execution'),
|
||||
];
|
||||
}
|
||||
|
||||
public function getUserConfigs(): array {
|
||||
return [];
|
||||
return [
|
||||
new Entry(self::USER_LANGUAGE, ValueType::STRING, null, 'language'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1218,7 +1218,6 @@ return array(
|
|||
'OC\\Comments\\ManagerFactory' => $baseDir . '/lib/private/Comments/ManagerFactory.php',
|
||||
'OC\\Config' => $baseDir . '/lib/private/Config.php',
|
||||
'OC\\Config\\ConfigManager' => $baseDir . '/lib/private/Config/ConfigManager.php',
|
||||
'OC\\Config\\Lexicon\\CoreConfigLexicon' => $baseDir . '/lib/private/Config/Lexicon/CoreConfigLexicon.php',
|
||||
'OC\\Config\\UserConfig' => $baseDir . '/lib/private/Config/UserConfig.php',
|
||||
'OC\\Console\\Application' => $baseDir . '/lib/private/Console/Application.php',
|
||||
'OC\\Console\\TimestampFormatter' => $baseDir . '/lib/private/Console/TimestampFormatter.php',
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
|||
'OC\\Comments\\ManagerFactory' => __DIR__ . '/../../..' . '/lib/private/Comments/ManagerFactory.php',
|
||||
'OC\\Config' => __DIR__ . '/../../..' . '/lib/private/Config.php',
|
||||
'OC\\Config\\ConfigManager' => __DIR__ . '/../../..' . '/lib/private/Config/ConfigManager.php',
|
||||
'OC\\Config\\Lexicon\\CoreConfigLexicon' => __DIR__ . '/../../..' . '/lib/private/Config/Lexicon/CoreConfigLexicon.php',
|
||||
'OC\\Config\\UserConfig' => __DIR__ . '/../../..' . '/lib/private/Config/UserConfig.php',
|
||||
'OC\\Console\\Application' => __DIR__ . '/../../..' . '/lib/private/Console/Application.php',
|
||||
'OC\\Console\\TimestampFormatter' => __DIR__ . '/../../..' . '/lib/private/Console/TimestampFormatter.php',
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ declare(strict_types=1);
|
|||
namespace OC\AppFramework\Bootstrap;
|
||||
|
||||
use Closure;
|
||||
use OC\Config\Lexicon\CoreConfigLexicon;
|
||||
use OC\Support\CrashReport\Registry;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||
|
|
@ -144,7 +143,7 @@ class RegistrationContext {
|
|||
private array $declarativeSettings = [];
|
||||
|
||||
/** @var array<array-key, string> */
|
||||
private array $configLexiconClasses = ['core' => CoreConfigLexicon::class];
|
||||
private array $configLexiconClasses = [];
|
||||
|
||||
/** @var ServiceRegistration<ITeamResourceProvider>[] */
|
||||
private array $teamResourceProviders = [];
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OC\Config\Lexicon;
|
||||
|
||||
use OCP\Config\Lexicon\Entry;
|
||||
use OCP\Config\Lexicon\ILexicon;
|
||||
use OCP\Config\Lexicon\Strictness;
|
||||
use OCP\Config\ValueType;
|
||||
|
||||
/**
|
||||
* ConfigLexicon for 'core' app/user configs
|
||||
*/
|
||||
class CoreConfigLexicon implements ILexicon {
|
||||
public function getStrictness(): Strictness {
|
||||
return Strictness::IGNORE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @return Entry[]
|
||||
*/
|
||||
public function getAppConfigs(): array {
|
||||
return [
|
||||
new Entry('lastcron', ValueType::INT, 0, 'timestamp of last cron execution'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @return Entry[]
|
||||
*/
|
||||
public function getUserConfigs(): array {
|
||||
return [
|
||||
new Entry('lang', ValueType::STRING, null, 'language'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue