more styling for disabled options

new "Developer" tab (by default all options are disabled, users can't modify them)
fixed UserprefsDisallow export in setup script
This commit is contained in:
Crack
2010-07-22 01:29:36 +02:00
parent 7b0135ed6a
commit 7ac7e24d8c
12 changed files with 119 additions and 46 deletions

View File

@@ -26,6 +26,19 @@ require_once './libraries/user_preferences.inc.php';
$form_display = new FormDisplay();
foreach ($forms[$form_param] as $form_name => $form) {
// skip Developer form if no setting is available
if ($form_name == 'Developer') {
$show = false;
foreach ($form as $field_name) {
if (array_search($field_name, $GLOBALS['cfg']['UserprefsDisallow']) === false) {
$show = true;
break;
}
}
if (!$show) {
continue;
}
}
$form_display->registerForm($form_name, $form);
}