Make isCollaboraEnabled an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-19 12:03:12 +01:00
parent 0c3d919618
commit cd1c2276e5
6 changed files with 13 additions and 23 deletions

View file

@ -78,6 +78,11 @@ class ConfigurationManager
set { $this->set('isOnlyofficeEnabled', $value); }
}
public bool $isCollaboraEnabled {
get => $this->get('isCollaboraEnabled', true);
set { $this->set('isCollaboraEnabled', $value); }
}
public function GetConfig() : array
{
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
@ -248,21 +253,6 @@ class ConfigurationManager
$this->WriteConfig($config);
}
public function isCollaboraEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) {
return false;
} else {
return true;
}
}
public function SetCollaboraEnabledState(int $value) : void {
$config = $this->GetConfig();
$config['isCollaboraEnabled'] = $value;
$this->WriteConfig($config);
}
public function isTalkEnabled() : bool {
$config = $this->GetConfig();
if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) {