Skip to content

Commit 11de3cf

Browse files
Merge pull request #55864 from nextcloud/fix/noid/tmp-switch-to-non-lazy
fix(lexicon): switch bool value to non-lazy
2 parents 58f3ff0 + 1329091 commit 11de3cf

File tree

7 files changed

+31
-58
lines changed

7 files changed

+31
-58
lines changed

core/AppInfo/ConfigLexicon.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function getAppConfigs(): array {
4949
type: ValueType::BOOL,
5050
defaultRaw: true,
5151
definition: 'adds share permission to public shares to allow adding them to your Nextcloud (federation)',
52-
lazy: true,
5352
),
5453
new Entry(
5554
key: self::SHARE_CUSTOM_TOKEN,
@@ -59,7 +58,6 @@ public function getAppConfigs(): array {
5958
default => false,
6059
},
6160
definition: 'Allow users to customize share URL',
62-
lazy: true,
6361
note: 'Shares with guessable tokens may be accessed easily. Shares with custom tokens will continue to be accessible after this setting has been disabled.',
6462
),
6563
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 {
9189
definition: 'Enforce expiration date for shares via link or mail'
9290
),
9391
new Entry(self::LASTCRON_TIMESTAMP, ValueType::INT, 0, 'timestamp of last cron execution'),
94-
new Entry(self::OCM_DISCOVERY_ENABLED, ValueType::BOOL, true, 'enable/disable OCM', lazy: true),
95-
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'),
96-
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'),
97-
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'),
92+
new Entry(self::OCM_DISCOVERY_ENABLED, ValueType::BOOL, true, 'enable/disable OCM'),
93+
new Entry(self::OCM_INVITE_ACCEPT_DIALOG, ValueType::STRING, '', 'route to local invite accept dialog', note: 'set as empty string to disable feature'),
94+
new Entry(self::UNIFIED_SEARCH_MIN_SEARCH_LENGTH, ValueType::INT, 1, 'Minimum search length to trigger the request', rename: 'unified-search.min-search-length'),
95+
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'),
9896
];
9997
}
10098

lib/composer/composer/autoload_classmap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,6 @@
19491949
'OC\\Remote\\User' => $baseDir . '/lib/private/Remote/User.php',
19501950
'OC\\Repair' => $baseDir . '/lib/private/Repair.php',
19511951
'OC\\RepairException' => $baseDir . '/lib/private/RepairException.php',
1952-
'OC\\Repair\\AddAppConfigLazyMigration' => $baseDir . '/lib/private/Repair/AddAppConfigLazyMigration.php',
19531952
'OC\\Repair\\AddBruteForceCleanupJob' => $baseDir . '/lib/private/Repair/AddBruteForceCleanupJob.php',
19541953
'OC\\Repair\\AddCleanupDeletedUsersBackgroundJob' => $baseDir . '/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php',
19551954
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => $baseDir . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',

lib/composer/composer/autoload_static.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
19901990
'OC\\Remote\\User' => __DIR__ . '/../../..' . '/lib/private/Remote/User.php',
19911991
'OC\\Repair' => __DIR__ . '/../../..' . '/lib/private/Repair.php',
19921992
'OC\\RepairException' => __DIR__ . '/../../..' . '/lib/private/RepairException.php',
1993-
'OC\\Repair\\AddAppConfigLazyMigration' => __DIR__ . '/../../..' . '/lib/private/Repair/AddAppConfigLazyMigration.php',
19941993
'OC\\Repair\\AddBruteForceCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddBruteForceCleanupJob.php',
19951994
'OC\\Repair\\AddCleanupDeletedUsersBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php',
19961995
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',

lib/private/Config/ConfigManager.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,39 @@ public function migrateConfigLexiconKeys(?string $appId = null): void {
8585
/**
8686
* Upgrade stored data in case of changes in the lexicon.
8787
* Heavy process to be executed on core and app upgrade.
88-
*
89-
* - upgrade UserConfig entries if set as indexed
9088
*/
9189
public function updateLexiconEntries(string $appId): void {
9290
$this->loadConfigServices();
91+
$this->updateLexiconAppConfigEntries($appId);
92+
$this->updateLexiconUserConfigEntries($appId);
93+
}
94+
95+
/**
96+
* Apply modification on the lexicon to the stored app config values:
97+
*
98+
* - Upgrade AppConfig entries if set as lazy/not-lazy
99+
*/
100+
private function updateLexiconAppConfigEntries(string $appId): void {
101+
$lexicon = $this->appConfig->getConfigDetailsFromLexicon($appId);
102+
foreach ($lexicon['entries'] as $entry) {
103+
// update laziness
104+
$this->appConfig->updateLazy($appId, $entry->getKey(), $entry->isLazy());
105+
}
106+
}
107+
108+
/**
109+
* Apply modification on the lexicon to the stored user preferences values:
110+
*
111+
* - Upgrade UserConfig entries if set as indexed/not-indexed
112+
* - Upgrade UserConfig entries if set as lazy/not-lazy
113+
*/
114+
private function updateLexiconUserConfigEntries(string $appId): void {
93115
$lexicon = $this->userConfig->getConfigDetailsFromLexicon($appId);
94116
foreach ($lexicon['entries'] as $entry) {
95117
// upgrade based on index flag
96118
$this->userConfig->updateGlobalIndexed($appId, $entry->getKey(), $entry->isFlagged(IUserConfig::FLAG_INDEXED));
119+
// update laziness
120+
$this->userConfig->updateGlobalLazy($appId, $entry->getKey(), $entry->isLazy());
97121
}
98122
}
99123

lib/private/Repair.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace OC;
99

1010
use OC\DB\ConnectionAdapter;
11-
use OC\Repair\AddAppConfigLazyMigration;
1211
use OC\Repair\AddBruteForceCleanupJob;
1312
use OC\Repair\AddCleanupDeletedUsersBackgroundJob;
1413
use OC\Repair\AddCleanupUpdaterBackupsJob;
@@ -196,7 +195,6 @@ public static function getRepairSteps(): array {
196195
\OCP\Server::get(AddMissingSecretJob::class),
197196
\OCP\Server::get(AddRemoveOldTasksBackgroundJob::class),
198197
\OCP\Server::get(AddMetadataGenerationJob::class),
199-
\OCP\Server::get(AddAppConfigLazyMigration::class),
200198
\OCP\Server::get(RepairLogoDimension::class),
201199
\OCP\Server::get(RemoveLegacyDatadirFile::class),
202200
\OCP\Server::get(AddCleanupDeletedUsersBackgroundJob::class),

lib/private/Repair/AddAppConfigLazyMigration.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
1010
// when updating major/minor version number.
1111

12-
$OC_Version = [33, 0, 0, 1];
12+
$OC_Version = [33, 0, 0, 2];
1313

1414
// The human-readable string
1515
$OC_VersionString = '33.0.0 dev';

0 commit comments

Comments
 (0)