Revert "refactor global array"

This reverts commit 370ccbdb74.
This commit is contained in:
Michael Kaufmann
2018-12-22 08:15:31 +01:00
parent c800e89414
commit 7e39a7bc60
220 changed files with 2244 additions and 2227 deletions

View File

@@ -18,6 +18,8 @@
*/
function getFormFieldOutput($fieldname, $fielddata)
{
global $lng;
$returnvalue = '';
if (is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type']))) {
if (isset($fielddata['label']) && is_array($fielddata['label'])) {
@@ -47,7 +49,7 @@ function getFormFieldOutput($fieldname, $fielddata)
$websrv = Settings::Get('system.webserver');
if (! in_array($websrv, $fielddata['websrv_avail'])) {
$do_show = false;
$fielddata['label'] .= sprintf(\Froxlor\I18N\Lang::getAll()['serversettings']['option_unavailable_websrv'], implode(", ", $fielddata['websrv_avail']));
$fielddata['label'] .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $fielddata['websrv_avail']));
}
}
@@ -57,7 +59,7 @@ function getFormFieldOutput($fieldname, $fielddata)
if (isset($fielddata['visible']) && $do_show) {
$do_show = $fielddata['visible'];
if (! $do_show) {
$fielddata['label'] .= \Froxlor\I18N\Lang::getAll()['serversettings']['option_unavailable'];
$fielddata['label'] .= $lng['serversettings']['option_unavailable'];
}
}

View File

@@ -18,14 +18,14 @@
*/
function getFormGroupOutput($groupname, $groupdetails)
{
global $theme;
global $lng, $theme;
eval("\$group = \"" . \Froxlor\UI\Template::getTemplate("settings/settings_group") . "\";");
return $group;
}
function getFormOverviewGroupOutput($groupname, $groupdetails)
{
global $filename, $s, $theme;
global $lng, $filename, $s, $theme;
$group = '';
$title = $groupdetails['title'];
@@ -52,7 +52,7 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
$option .= '</select>';
$activated = true;
} else {
$option .= \Froxlor\I18N\Lang::getAll()['admin']['activated'] . ':&nbsp;';
$option .= $lng['admin']['activated'] . ':&nbsp;';
$option .= \Froxlor\UI\HTML::makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
$activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
}
@@ -71,7 +71,7 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
$websrv = Settings::Get('system.webserver');
if (! in_array($websrv, $groupdetails['websrv_avail'])) {
$do_show = false;
$title .= sprintf(\Froxlor\I18N\Lang::getAll()['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail']));
$title .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail']));
// hack disabled flag into select-box
$option = str_replace('<select class', '<select disabled="disabled" class', $option);
}