Make 'nextcloudEnableDriDevice' an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-26 10:26:39 +01:00
parent 76b871fc86
commit f5a035c450
3 changed files with 5 additions and 15 deletions

View file

@ -919,19 +919,9 @@ class ConfigurationManager
return $cc;
}
private function GetEnabledDriDevice() : string {
$envVariableName = 'NEXTCLOUD_ENABLE_DRI_DEVICE';
$configName = 'nextcloud_enable_dri_device';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function isDriDeviceEnabled() : bool {
if ($this->GetEnabledDriDevice() === 'true') {
return true;
} else {
return false;
}
public bool $nextcloudEnableDriDevice{
get => booleanize($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_ENABLE_DRI_DEVICE', 'nextcloud_enable_dri_device', ''));
set { $this->set('nextcloud_enable_dri_device', $value); }
}
private function GetEnabledNvidiaGpu() : string {