diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-11-08 10:57:00 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-11-08 10:57:00 +0100 |
commit | 4a05e8a7e8a39aee331a1d5bc45fbc1710ac6a15 (patch) | |
tree | 9f98cf34d2be44fd53c02f6488426002ec680263 /program | |
parent | 29b2937f7bc16ed3312eaacc204ede8f19083e82 (diff) |
Finish advanced prefs feature (#1488829)
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/settings/func.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index c922aca08..016264128 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -1180,11 +1180,21 @@ 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]); + } + } } } |