diff options
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r-- | program/steps/settings/func.inc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index c922aca08..81744d904 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -1180,12 +1180,29 @@ function rcmail_user_prefs($current = null) $data = $RCMAIL->plugins->exec_hook('preferences_list', array('section' => $sect['id'], 'blocks' => $blocks, 'current' => $current)); + $advanced_prefs = $config['advanced_prefs']; + // create output - foreach ($data['blocks'] as $block) { + foreach ($data['blocks'] as $key => $block) { if (!empty($block['content']) || !empty($block['options'])) { $found = true; - break; } + // move some options to the 'advanced' block as configured by admin + if ($key != 'advanced') { + foreach ($advanced_prefs as $opt) { + if ($block['options'][$opt]) { + $data['blocks']['advanced']['options'][$opt] = $block['options'][$opt]; + unset($data['blocks'][$key]['options'][$opt]); + } + } + } + } + + // move 'advanced' block to the end of the list + if (!empty($data['blocks']['advanced'])) { + $adv = $data['blocks']['advanced']; + unset($data['blocks']['advanced']); + $data['blocks']['advanced'] = $adv; } if (!$found) |