fix hide-incompatible-settings feature

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2020-12-30 17:16:15 +01:00
parent f213d666e2
commit 5efc1849b4

View File

@@ -428,7 +428,7 @@ class Form
if (isset($fielddata['websrv_avail']) && is_array($fielddata['websrv_avail'])) {
$websrv = Settings::Get('system.webserver');
if (! in_array($websrv, $fielddata['websrv_avail'])) {
$do_show = Settings::Get('system.hide_incompatible_settings') == '1' ? false : true;
$do_show = false;
$fielddata['label'] .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $fielddata['websrv_avail']));
}
}
@@ -439,12 +439,11 @@ class Form
if (isset($fielddata['visible']) && $do_show) {
$do_show = $fielddata['visible'];
if (! $do_show) {
$do_show = Settings::Get('system.hide_incompatible_settings') == '1' ? false : true;
$fielddata['label'] .= $lng['serversettings']['option_unavailable'];
}
}
if ($do_show) {
if ($do_show || (!$do_show && Settings::Get('system.hide_incompatible_settings') == '0')) {
$returnvalue = call_user_func(array(
'\\Froxlor\\UI\\Fields',
'getFormFieldOutput' . ucfirst($fielddata['type'])