mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 21:16:52 +00:00
Make isOnlyofficeEnabled an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
1013cb02fd
commit
2c7f32c4d4
5 changed files with 10 additions and 24 deletions
|
|
@ -73,6 +73,11 @@ class ConfigurationManager
|
|||
set { $this->set('isClamavEnabled', $value); }
|
||||
}
|
||||
|
||||
public bool $isOnlyofficeEnabled {
|
||||
get => $this->get('isOnlyofficeEnabled', false);
|
||||
set { $this->set('isOnlyofficeEnabled', $value); }
|
||||
}
|
||||
|
||||
public function GetConfig() : array
|
||||
{
|
||||
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
|
||||
|
|
@ -243,21 +248,6 @@ class ConfigurationManager
|
|||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isOnlyofficeEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function SetOnlyofficeEnabledState(int $value) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['isOnlyofficeEnabled'] = $value;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isCollaboraEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue