don't show settings which are not needed for used webserver, fixes #502

This commit is contained in:
Michael Kaufmann (d00p)
2010-12-02 08:18:46 +00:00
parent ebb390a1fd
commit 30235ff3eb
8 changed files with 132 additions and 63 deletions

View File

@@ -71,6 +71,24 @@ function getFormOverviewGroupOutput($groupname, $groupdetails)
}
}
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
/**
* 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
* 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['system']['webserver'];
if(!in_array($websrv, $groupdetails['websrv_avail']))
{
$do_show = false;
}
}
if($do_show)
{
eval("\$group = \"" . getTemplate("settings/settings_overviewgroup") . "\";");
}
return $group;
}