Merge pull request #54740 from nextcloud/backport/54630/stable31

[stable31] fix(theming): avoid error when changing theming colors from occ when initially set via the Web UI
This commit is contained in:
Salvatore Martire 2025-08-29 17:28:56 +02:00 committed by GitHub
commit 3ece90ae19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 11 deletions

View file

@ -432,7 +432,7 @@ class ThemingDefaults extends \OC_Defaults {
* @param string $value
*/
public function set($setting, $value): void {
$this->config->setAppValue('theming', $setting, $value);
$this->appConfig->setValueString('theming', $setting, $value);
$this->increaseCacheBuster();
}

View file

@ -500,18 +500,14 @@ class ThemingDefaultsTest extends TestCase {
}
public function testSet(): void {
$expectedCalls = [
['theming', 'MySetting', 'MyValue'],
['theming', 'cachebuster', 16],
];
$i = 0;
$this->config
->expects($this->exactly(2))
->expects($this->once())
->method('setAppValue')
->willReturnCallback(function () use ($expectedCalls, &$i): void {
$this->assertEquals($expectedCalls[$i], func_get_args());
$i++;
});
->with('theming', 'cachebuster', 16);
$this->appConfig
->expects($this->once())
->method('setValueString')
->with('theming', 'MySetting', 'MyValue');
$this->config
->expects($this->once())
->method('getAppValue')