mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Avoid updating _lastChange when nothing is changed in the configuration
Had to set at least one var when creating an empty configuration in order to save the default values. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
bd9c4fbc07
commit
9fc00fdb82
3 changed files with 4 additions and 3 deletions
|
|
@ -59,6 +59,7 @@ class CreateEmptyConfig extends Command {
|
|||
protected function execute(InputInterface $input, OutputInterface $output): int {
|
||||
$configPrefix = $this->helper->getNextServerConfigurationPrefix();
|
||||
$configHolder = new Configuration($configPrefix);
|
||||
$configHolder->ldapConfigurationActive = false;
|
||||
$configHolder->saveConfiguration();
|
||||
|
||||
$prose = '';
|
||||
|
|
|
|||
|
|
@ -56,10 +56,9 @@ class Configuration {
|
|||
*/
|
||||
protected $configRead = false;
|
||||
/**
|
||||
* @var string[] pre-filled with one reference key so that at least one entry is written on save request and
|
||||
* the config ID is registered
|
||||
* @var string[]
|
||||
*/
|
||||
protected $unsavedChanges = ['ldapConfigurationActive' => 'ldapConfigurationActive'];
|
||||
protected array $unsavedChanges = [];
|
||||
|
||||
/**
|
||||
* @var array<string, mixed> settings
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class ConfigAPIController extends OCSController {
|
|||
try {
|
||||
$configPrefix = $this->ldapHelper->getNextServerConfigurationPrefix();
|
||||
$configHolder = new Configuration($configPrefix);
|
||||
$configHolder->ldapConfigurationActive = false;
|
||||
$configHolder->saveConfiguration();
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->logException($e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue