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