Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2980,9 +2980,6 @@
<code><![CDATA[getAppValue]]></code>
<code><![CDATA[setAppValue]]></code>
</DeprecatedMethod>
<NullArgument>
<code><![CDATA[null]]></code>
</NullArgument>
</file>
<file src="core/Command/Encryption/MigrateKeyStorage.php">
<DeprecatedClass>
Expand Down Expand Up @@ -3301,11 +3298,6 @@
<code><![CDATA[ActivitySettings[]]]></code>
</MoreSpecificReturnType>
</file>
<file src="lib/private/AllConfig.php">
<MoreSpecificImplementedParamType>
<code><![CDATA[$key]]></code>
</MoreSpecificImplementedParamType>
</file>
<file src="lib/private/App/DependencyAnalyzer.php">
<InvalidNullableReturnType>
<code><![CDATA[bool]]></code>
Expand All @@ -3314,11 +3306,6 @@
<code><![CDATA[version_compare($first, $second, $operator)]]></code>
</NullableReturnStatement>
</file>
<file src="lib/private/AppConfig.php">
<NullableReturnStatement>
<code><![CDATA[$this->fastCache[$app][$key] ?? $default]]></code>
</NullableReturnStatement>
</file>
<file src="lib/private/AppFramework/Bootstrap/FunctionInjector.php">
<UndefinedMethod>
<code><![CDATA[getName]]></code>
Expand Down Expand Up @@ -4015,9 +4002,6 @@
<code><![CDATA[false]]></code>
<code><![CDATA[false]]></code>
</InvalidArgument>
<NullArgument>
<code><![CDATA[null]]></code>
</NullArgument>
</file>
<file src="lib/private/IntegrityCheck/Checker.php">
<InvalidArrayAccess>
Expand Down Expand Up @@ -4394,9 +4378,6 @@
<InvalidArgument>
<code><![CDATA[$groupsList]]></code>
</InvalidArgument>
<NullArgument>
<code><![CDATA[null]]></code>
</NullArgument>
</file>
<file src="lib/private/legacy/OC_Helper.php">
<InvalidArrayOffset>
Expand Down
9 changes: 9 additions & 0 deletions config/config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -1792,6 +1792,15 @@
*/
'cache_chunk_gc_ttl' => 60*60*24,

/**
* Enable caching of the app config values.
* If enabled the app config will be cached locally for a short TTL,
* reducing database load significatly on larger setups.
*
* Defaults to ``true``
*/
'cache_app_config' => true,

/**
* Using Object Store with Nextcloud
*/
Expand Down
4 changes: 2 additions & 2 deletions core/Command/Encryption/Enable.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('<error>No encryption module is loaded</error>');
return 1;
}
$defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
if ($defaultModule === null) {
$defaultModule = $this->config->getAppValue('core', 'default_encryption_module');
if ($defaultModule === '') {
$output->writeln('<error>No default module is set</error>');
return 1;
}
Expand Down
13 changes: 13 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,16 @@ Cypress.Commands.add('userFileExists', (user: string, path: string) => {
return cy.runCommand(`stat --printf="%s" "data/${user}/files/${path}"`, { failOnNonZeroExit: true })
.then((exec) => Number.parseInt(exec.stdout || '0'))
})

Cypress.Commands.add('runOccCommand', (command: string, options?: Partial<Cypress.ExecOptions>) => {
return cy.runCommand(`php ./occ ${command}`, options)
.then((context) =>
// OCC cannot clear the APCu cache
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(
command.startsWith('app:') || command.startsWith('config:')
? 3000 // clear APCu cache
: 0,
).then(() => context),
)
})
2 changes: 1 addition & 1 deletion lib/private/AllConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function setAppValue($appName, $key, $value) {
* @deprecated 29.0.0 Use {@see IAppConfig} directly
*/
public function getAppValue($appName, $key, $default = '') {
return \OC::$server->get(AppConfig::class)->getValue($appName, $key, $default);
return \OC::$server->get(AppConfig::class)->getValue($appName, $key, $default) ?? $default;
}

/**
Expand Down
Loading