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,16 +16,15 @@
|
||||
* @package Functions
|
||||
*
|
||||
*/
|
||||
|
||||
function getFormGroupOutput($groupname, $groupdetails) {
|
||||
|
||||
function getFormGroupOutput($groupname, $groupdetails)
|
||||
{
|
||||
global $lng, $theme;
|
||||
eval("\$group = \"" . \Froxlor\UI\Template::getTemplate("settings/settings_group") . "\";");
|
||||
return $group;
|
||||
}
|
||||
|
||||
function getFormOverviewGroupOutput($groupname, $groupdetails) {
|
||||
|
||||
function getFormOverviewGroupOutput($groupname, $groupdetails)
|
||||
{
|
||||
global $lng, $filename, $s, $theme;
|
||||
|
||||
$group = '';
|
||||
@@ -34,38 +33,28 @@ function getFormOverviewGroupOutput($groupname, $groupdetails) {
|
||||
|
||||
$activated = true;
|
||||
$option = '';
|
||||
if(isset($groupdetails['fields']))
|
||||
{
|
||||
foreach($groupdetails['fields'] as $fieldname => $fielddetails)
|
||||
{
|
||||
if(isset($fielddetails['overview_option'])
|
||||
&& $fielddetails['overview_option'] == true
|
||||
) {
|
||||
if($fielddetails['type'] != 'option'
|
||||
&& $fielddetails['type'] != 'bool')
|
||||
{
|
||||
if (isset($groupdetails['fields'])) {
|
||||
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
|
||||
if (isset($fielddetails['overview_option']) && $fielddetails['overview_option'] == true) {
|
||||
if ($fielddetails['type'] != 'option' && $fielddetails['type'] != 'bool') {
|
||||
\Froxlor\UI\Response::standard_error('overviewsettingoptionisnotavalidfield');
|
||||
}
|
||||
|
||||
if($fielddetails['type'] == 'option')
|
||||
{
|
||||
if ($fielddetails['type'] == 'option') {
|
||||
$options_array = $fielddetails['option_options'];
|
||||
$options = '';
|
||||
foreach($options_array as $value => $vtitle)
|
||||
{
|
||||
$options .= makeoption($vtitle, $value, Settings::Get($fielddetails['settinggroup'].'.'.$fielddetails['varname']));
|
||||
foreach ($options_array as $value => $vtitle) {
|
||||
$options .= makeoption($vtitle, $value, Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
|
||||
}
|
||||
$option.= $fielddetails['label'].': ';
|
||||
$option.= '<select class="dropdown_noborder" name="'.$fieldname.'">';
|
||||
$option.= $options;
|
||||
$option.= '</select>';
|
||||
$option .= $fielddetails['label'] . ': ';
|
||||
$option .= '<select class="dropdown_noborder" name="' . $fieldname . '">';
|
||||
$option .= $options;
|
||||
$option .= '</select>';
|
||||
$activated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option.= $lng['admin']['activated'].': ';
|
||||
$option.= makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'].'.'.$fielddetails['varname']));
|
||||
$activated = (int)Settings::Get($fielddetails['settinggroup'].'.'.$fielddetails['varname']);
|
||||
} else {
|
||||
$option .= $lng['admin']['activated'] . ': ';
|
||||
$option .= makeyesno($fieldname, '1', '0', Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']));
|
||||
$activated = (int) Settings::Get($fielddetails['settinggroup'] . '.' . $fielddetails['varname']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,13 +62,14 @@ function getFormOverviewGroupOutput($groupname, $groupdetails) {
|
||||
|
||||
/**
|
||||
* this part checks for the 'websrv_avail' entry in the settings
|
||||
* 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($groupdetails['websrv_avail']) && is_array($groupdetails['websrv_avail'])) {
|
||||
$websrv = Settings::Get('system.webserver');
|
||||
if (!in_array($websrv, $groupdetails['websrv_avail'])) {
|
||||
if (! in_array($websrv, $groupdetails['websrv_avail'])) {
|
||||
$do_show = false;
|
||||
$title .= sprintf($lng['serversettings']['option_unavailable_websrv'], implode(", ", $groupdetails['websrv_avail']));
|
||||
// hack disabled flag into select-box
|
||||
|
||||
Reference in New Issue
Block a user