diff options
author | Crack <piotrprz@gmail.com> | 2010-07-22 03:29:36 +0400 |
---|---|---|
committer | Crack <piotrprz@gmail.com> | 2010-07-22 03:29:36 +0400 |
commit | 7ac7e24d8cc97cb3c0234b0058661770c0d0f44c (patch) | |
tree | 72415f8e10fb3137ee5654a81c03a1874e9820c1 /prefs_forms.php | |
parent | 7b0135ed6a4dea645c5c18859cb6f08906504153 (diff) |
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
Diffstat (limited to 'prefs_forms.php')
-rw-r--r-- | prefs_forms.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/prefs_forms.php b/prefs_forms.php index a73e529d39..06cad1c7cd 100644 --- a/prefs_forms.php +++ b/prefs_forms.php @@ -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); } |