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