diff --git a/core/AppInfo/ConfigLexicon.php b/core/AppInfo/ConfigLexicon.php index 5faa0e4a296ae..5d1f726934748 100644 --- a/core/AppInfo/ConfigLexicon.php +++ b/core/AppInfo/ConfigLexicon.php @@ -49,7 +49,6 @@ public function getAppConfigs(): array { type: ValueType::BOOL, defaultRaw: true, definition: 'adds share permission to public shares to allow adding them to your Nextcloud (federation)', - lazy: true, ), new Entry( key: self::SHARE_CUSTOM_TOKEN, @@ -59,7 +58,6 @@ public function getAppConfigs(): array { default => false, }, definition: 'Allow users to customize share URL', - 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::SHARE_LINK_PASSWORD_DEFAULT, ValueType::BOOL, false, 'Ask for a password when sharing document by default'), @@ -91,10 +89,10 @@ public function getAppConfigs(): array { definition: 'Enforce expiration date for shares via link or mail' ), new Entry(self::LASTCRON_TIMESTAMP, ValueType::INT, 0, 'timestamp of last cron execution'), - new Entry(self::OCM_DISCOVERY_ENABLED, ValueType::BOOL, true, 'enable/disable OCM', lazy: true), - new Entry(self::OCM_INVITE_ACCEPT_DIALOG, ValueType::STRING, '', 'route to local invite accept dialog', lazy: true, note: 'set as empty string to disable feature'), - new Entry(self::UNIFIED_SEARCH_MIN_SEARCH_LENGTH, ValueType::INT, 1, 'Minimum search length to trigger the request', lazy: false, rename: 'unified-search.min-search-length'), - new Entry(self::UNIFIED_SEARCH_MAX_RESULTS_PER_REQUEST, ValueType::INT, 25, 'Maximum results returned per search request', lazy: false, rename: 'unified-search.max-results-per-request'), + new Entry(self::OCM_DISCOVERY_ENABLED, ValueType::BOOL, true, 'enable/disable OCM'), + new Entry(self::OCM_INVITE_ACCEPT_DIALOG, ValueType::STRING, '', 'route to local invite accept dialog', note: 'set as empty string to disable feature'), + new Entry(self::UNIFIED_SEARCH_MIN_SEARCH_LENGTH, ValueType::INT, 1, 'Minimum search length to trigger the request', rename: 'unified-search.min-search-length'), + new Entry(self::UNIFIED_SEARCH_MAX_RESULTS_PER_REQUEST, ValueType::INT, 25, 'Maximum results returned per search request', rename: 'unified-search.max-results-per-request'), ]; } diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 1dfbd6cc06de8..190929266b902 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -1946,7 +1946,6 @@ 'OC\\Remote\\User' => $baseDir . '/lib/private/Remote/User.php', 'OC\\Repair' => $baseDir . '/lib/private/Repair.php', 'OC\\RepairException' => $baseDir . '/lib/private/RepairException.php', - 'OC\\Repair\\AddAppConfigLazyMigration' => $baseDir . '/lib/private/Repair/AddAppConfigLazyMigration.php', 'OC\\Repair\\AddBruteForceCleanupJob' => $baseDir . '/lib/private/Repair/AddBruteForceCleanupJob.php', 'OC\\Repair\\AddCleanupDeletedUsersBackgroundJob' => $baseDir . '/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php', 'OC\\Repair\\AddCleanupUpdaterBackupsJob' => $baseDir . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 4666d78706383..ee51d218b61dd 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -1987,7 +1987,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\Remote\\User' => __DIR__ . '/../../..' . '/lib/private/Remote/User.php', 'OC\\Repair' => __DIR__ . '/../../..' . '/lib/private/Repair.php', 'OC\\RepairException' => __DIR__ . '/../../..' . '/lib/private/RepairException.php', - 'OC\\Repair\\AddAppConfigLazyMigration' => __DIR__ . '/../../..' . '/lib/private/Repair/AddAppConfigLazyMigration.php', 'OC\\Repair\\AddBruteForceCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddBruteForceCleanupJob.php', 'OC\\Repair\\AddCleanupDeletedUsersBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php', 'OC\\Repair\\AddCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php', diff --git a/lib/private/Config/ConfigManager.php b/lib/private/Config/ConfigManager.php index f5ef024578cf9..302b7b3b725b8 100644 --- a/lib/private/Config/ConfigManager.php +++ b/lib/private/Config/ConfigManager.php @@ -85,15 +85,39 @@ public function migrateConfigLexiconKeys(?string $appId = null): void { /** * Upgrade stored data in case of changes in the lexicon. * Heavy process to be executed on core and app upgrade. - * - * - upgrade UserConfig entries if set as indexed */ public function updateLexiconEntries(string $appId): void { $this->loadConfigServices(); + $this->updateLexiconAppConfigEntries($appId); + $this->updateLexiconUserConfigEntries($appId); + } + + /** + * Apply modification on the lexicon to the stored app config values: + * + * - Upgrade AppConfig entries if set as lazy/not-lazy + */ + private function updateLexiconAppConfigEntries(string $appId): void { + $lexicon = $this->appConfig->getConfigDetailsFromLexicon($appId); + foreach ($lexicon['entries'] as $entry) { + // update laziness + $this->appConfig->updateLazy($appId, $entry->getKey(), $entry->isLazy()); + } + } + + /** + * Apply modification on the lexicon to the stored user preferences values: + * + * - Upgrade UserConfig entries if set as indexed/not-indexed + * - Upgrade UserConfig entries if set as lazy/not-lazy + */ + private function updateLexiconUserConfigEntries(string $appId): void { $lexicon = $this->userConfig->getConfigDetailsFromLexicon($appId); foreach ($lexicon['entries'] as $entry) { // upgrade based on index flag $this->userConfig->updateGlobalIndexed($appId, $entry->getKey(), $entry->isFlagged(IUserConfig::FLAG_INDEXED)); + // update laziness + $this->userConfig->updateGlobalLazy($appId, $entry->getKey(), $entry->isLazy()); } } diff --git a/lib/private/Repair.php b/lib/private/Repair.php index 583604515afe1..c32139f5bf013 100644 --- a/lib/private/Repair.php +++ b/lib/private/Repair.php @@ -8,7 +8,6 @@ namespace OC; use OC\DB\ConnectionAdapter; -use OC\Repair\AddAppConfigLazyMigration; use OC\Repair\AddBruteForceCleanupJob; use OC\Repair\AddCleanupDeletedUsersBackgroundJob; use OC\Repair\AddCleanupUpdaterBackupsJob; @@ -194,7 +193,6 @@ public static function getRepairSteps(): array { \OCP\Server::get(AddMissingSecretJob::class), \OCP\Server::get(AddRemoveOldTasksBackgroundJob::class), \OCP\Server::get(AddMetadataGenerationJob::class), - \OCP\Server::get(AddAppConfigLazyMigration::class), \OCP\Server::get(RepairLogoDimension::class), \OCP\Server::get(RemoveLegacyDatadirFile::class), \OCP\Server::get(AddCleanupDeletedUsersBackgroundJob::class), diff --git a/lib/private/Repair/AddAppConfigLazyMigration.php b/lib/private/Repair/AddAppConfigLazyMigration.php deleted file mode 100644 index 7ae83e8766940..0000000000000 --- a/lib/private/Repair/AddAppConfigLazyMigration.php +++ /dev/null @@ -1,45 +0,0 @@ - [ - 'oc.integritycheck.checker', - ], - ]; - - public function __construct( - private IAppConfig $appConfig, - private LoggerInterface $logger, - ) { - } - - public function getName() { - return 'migrate lazy config values'; - } - - public function run(IOutput $output) { - $c = 0; - foreach (self::$lazyAppConfig as $appId => $configKeys) { - foreach ($configKeys as $configKey) { - $c += (int)$this->appConfig->updateLazy($appId, $configKey, true); - } - } - - $this->logger->notice('core/BackgroundJobs/AppConfigLazyMigration: ' . $c . ' config values updated'); - } -} diff --git a/version.php b/version.php index 02fd223328915..90ee31707fb06 100644 --- a/version.php +++ b/version.php @@ -9,7 +9,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level // when updating major/minor version number. -$OC_Version = [32, 0, 1, 0]; +$OC_Version = [32, 0, 1, 1]; // The human-readable string $OC_VersionString = '32.0.1 RC1';