auto-format all files; add table-definitions to test-bootstrap file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -16,17 +16,12 @@
|
||||
* @package Functions
|
||||
*
|
||||
*/
|
||||
|
||||
function getFormFieldOutput($fieldname, $fielddata) {
|
||||
|
||||
function getFormFieldOutput($fieldname, $fielddata)
|
||||
{
|
||||
global $lng;
|
||||
|
||||
$returnvalue = '';
|
||||
if (is_array($fielddata)
|
||||
&& isset($fielddata['type'])
|
||||
&& $fielddata['type'] != ''
|
||||
&& function_exists('getFormFieldOutput' . ucfirst($fielddata['type']))
|
||||
) {
|
||||
if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type']))) {
|
||||
if (isset($fielddata['label']) && is_array($fielddata['label'])) {
|
||||
if (isset($fielddata['label']['title']) && isset($fielddata['label']['description'])) {
|
||||
$fielddata['label'] = '<b>' . $fielddata['label']['title'] . '</b><br />' . $fielddata['label']['description'];
|
||||
@@ -35,7 +30,7 @@ function getFormFieldOutput($fieldname, $fielddata) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($fielddata['value'])) {
|
||||
if (! isset($fielddata['value'])) {
|
||||
if (isset($fielddata['default'])) {
|
||||
$fielddata['value'] = $fielddata['default'];
|
||||
} else {
|
||||
@@ -45,15 +40,16 @@ function getFormFieldOutput($fieldname, $fielddata) {
|
||||
|
||||
/**
|
||||
* this part checks for the 'websrv_avail' entry in the settings-array
|
||||
* if found, we check if the current webserver is in the array. If this
|
||||
* if found, we check if the current webserver is in the array.
|
||||
* If this
|
||||
* is not the case, we change the setting type to "hidden", #502
|
||||
*/
|
||||
$do_show = true;
|
||||
if (isset($fielddata['websrv_avail']) && is_array($fielddata['websrv_avail'])) {
|
||||
$websrv = Settings::Get('system.webserver');
|
||||
if (!in_array($websrv, $fielddata['websrv_avail'])) {
|
||||
if (! in_array($websrv, $fielddata['websrv_avail'])) {
|
||||
$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']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,14 +58,14 @@ function getFormFieldOutput($fieldname, $fielddata) {
|
||||
// be false due to websrv_avail
|
||||
if (isset($fielddata['visible']) && $do_show) {
|
||||
$do_show = $fielddata['visible'];
|
||||
if (!$do_show) {
|
||||
$fielddata['label'].= $lng['serversettings']['option_unavailable'];
|
||||
if (! $do_show) {
|
||||
$fielddata['label'] .= $lng['serversettings']['option_unavailable'];
|
||||
}
|
||||
}
|
||||
|
||||
//if ($do_show) {
|
||||
$returnvalue = call_user_func('getFormFieldOutput' . ucfirst($fielddata['type']), $fieldname, $fielddata, $do_show);
|
||||
//}
|
||||
// if ($do_show) {
|
||||
$returnvalue = call_user_func('getFormFieldOutput' . ucfirst($fielddata['type']), $fieldname, $fielddata, $do_show);
|
||||
// }
|
||||
}
|
||||
return $returnvalue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user