Make restoreExcludePreviews an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 13:02:19 +01:00
parent 0c20e2b2f9
commit a1bb53a400
3 changed files with 7 additions and 16 deletions

View file

@ -23,6 +23,11 @@ class ConfigurationManager
set { $this->set('password', $value); }
}
public bool $restoreExcludePreviews {
get => $this->get('restore-exclude-previews', false);
set { $this->set('restore-exclude-previews', $value); }
}
public string $selectedRestoreTime {
get => $this->get('selected-restore-time', '');
set { $this->set('selected-restore-time', $value); }
@ -472,15 +477,6 @@ class ConfigurationManager
$this->WriteConfig($config);
}
public function GetRestoreExcludePreviews() : string {
$config = $this->GetConfig();
if(!isset($config['restore-exclude-previews'])) {
$config['restore-exclude-previews'] = '';
}
return $config['restore-exclude-previews'];
}
/**
* @throws InvalidSettingConfigurationException
*/