Make isWhiteboardEnabled an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 13:00:22 +01:00
parent a1bb53a400
commit 419eede1c0
5 changed files with 10 additions and 24 deletions

View file

@ -23,6 +23,11 @@ class ConfigurationManager
set { $this->set('password', $value); }
}
public bool $isWhiteboardEnabled {
get => $this->get('isWhiteboardEnabled', true);
set { $this->set('isWhiteboardEnabled', $value); }
}
public bool $restoreExcludePreviews {
get => $this->get('restore-exclude-previews', false);
set { $this->set('restore-exclude-previews', $value); }
@ -207,21 +212,6 @@ class ConfigurationManager
$this->WriteConfig($config);
}
public function isWhiteboardEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isWhiteboardEnabled']) && $config['isWhiteboardEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetWhiteboardEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isWhiteboardEnabled'] = $value;
$this->WriteConfig($config);
}
public function SetClamavEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isClamavEnabled'] = $value;