mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 13:06:53 +00:00
Make aio_community_containers an attribute
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
b6e429f1f3
commit
772fab9577
5 changed files with 9 additions and 25 deletions
|
|
@ -160,6 +160,11 @@ class ConfigurationManager
|
|||
}
|
||||
}
|
||||
|
||||
public array $aio_community_containers {
|
||||
get => explode(' ', $this->get('aio_community_containers', ''));
|
||||
set { $this->set('aio_community_containers', implode(' ', $value)); }
|
||||
}
|
||||
|
||||
public function GetConfig() : array
|
||||
{
|
||||
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
|
||||
|
|
@ -931,16 +936,6 @@ class ConfigurationManager
|
|||
}
|
||||
}
|
||||
|
||||
private function GetCommunityContainers() : string {
|
||||
$config = $this->GetConfig();
|
||||
if(!isset($config['aio_community_containers'])) {
|
||||
$config['aio_community_containers'] = '';
|
||||
}
|
||||
|
||||
return $config['aio_community_containers'];
|
||||
}
|
||||
|
||||
|
||||
public function listAvailableCommunityContainers() : array {
|
||||
$cc = [];
|
||||
$dir = scandir(DataConst::GetCommunityContainersDirectory());
|
||||
|
|
@ -976,17 +971,6 @@ class ConfigurationManager
|
|||
return $cc;
|
||||
}
|
||||
|
||||
/** @return list<string> */
|
||||
public function GetEnabledCommunityContainers(): array {
|
||||
return explode(' ', $this->GetCommunityContainers());
|
||||
}
|
||||
|
||||
public function SetEnabledCommunityContainers(array $enabledCommunityContainers) : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['aio_community_containers'] = implode(' ', $enabledCommunityContainers);
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
private function GetEnabledDriDevice() : string {
|
||||
$envVariableName = 'NEXTCLOUD_ENABLE_DRI_DEVICE';
|
||||
$configName = 'nextcloud_enable_dri_device';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue