fix hide-incompatible-settings feature
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -428,7 +428,7 @@ class Form
|
|||||||
if (isset($fielddata['websrv_avail']) && is_array($fielddata['websrv_avail'])) {
|
if (isset($fielddata['websrv_avail']) && is_array($fielddata['websrv_avail'])) {
|
||||||
$websrv = Settings::Get('system.webserver');
|
$websrv = Settings::Get('system.webserver');
|
||||||
if (! in_array($websrv, $fielddata['websrv_avail'])) {
|
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']));
|
$fielddata['label'] .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $fielddata['websrv_avail']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -439,12 +439,11 @@ class Form
|
|||||||
if (isset($fielddata['visible']) && $do_show) {
|
if (isset($fielddata['visible']) && $do_show) {
|
||||||
$do_show = $fielddata['visible'];
|
$do_show = $fielddata['visible'];
|
||||||
if (! $do_show) {
|
if (! $do_show) {
|
||||||
$do_show = Settings::Get('system.hide_incompatible_settings') == '1' ? false : true;
|
|
||||||
$fielddata['label'] .= $lng['serversettings']['option_unavailable'];
|
$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(
|
$returnvalue = call_user_func(array(
|
||||||
'\\Froxlor\\UI\\Fields',
|
'\\Froxlor\\UI\\Fields',
|
||||||
'getFormFieldOutput' . ucfirst($fielddata['type'])
|
'getFormFieldOutput' . ucfirst($fielddata['type'])
|
||||||
|
|||||||
Reference in New Issue
Block a user