mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
add imaginary
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
c926f92b6f
commit
05e90d6110
13 changed files with 95 additions and 2 deletions
|
|
@ -65,6 +65,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($entry['identifier'] === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$ports = new ContainerPorts();
|
||||
|
|
@ -146,6 +150,10 @@ class ContainerDefinitionFetcher
|
|||
if (!$this->configurationManager->isTalkEnabled()) {
|
||||
continue;
|
||||
}
|
||||
} elseif ($value === 'nextcloud-aio-imaginary') {
|
||||
if (!$this->configurationManager->isImaginaryEnabled()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$dependsOn[] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,11 @@ class ConfigurationController
|
|||
} else {
|
||||
$this->configurationManager->SetTalkEnabledState(0);
|
||||
}
|
||||
if (isset($request->getParsedBody()['imaginary'])) {
|
||||
$this->configurationManager->SetImaginaryEnabledState(1);
|
||||
} else {
|
||||
$this->configurationManager->SetImaginaryEnabledState(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,21 @@ class ConfigurationManager
|
|||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isImaginaryEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function SetImaginaryEnabledState(int $value) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['isImaginaryEnabled'] = $value;
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function isOnlyofficeEnabled() : bool {
|
||||
$config = $this->GetConfig();
|
||||
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
||||
|
|
|
|||
|
|
@ -298,6 +298,12 @@ class DockerActionManager
|
|||
} else {
|
||||
$replacements[1] = $this->configurationManager->GetCollaboraDictionaries();
|
||||
}
|
||||
} elseif ($out[1] === 'IMAGINARY_ENABLED') {
|
||||
if ($this->configurationManager->isImaginaryEnabled()) {
|
||||
$replacements[1] = 'yes';
|
||||
} else {
|
||||
$replacements[1] = '';
|
||||
}
|
||||
} else {
|
||||
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue