diff options
author | alecpl <alec@alec.pl> | 2012-01-08 10:57:49 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-01-08 10:57:49 +0000 |
commit | c1d27d867935dd682eef01d20f3cb8c07e184c3b (patch) | |
tree | 01cb28de7651f36544b1aa7b192ed72711ccce56 /program | |
parent | 88dcd00a9a45dc5f20ded910e56dd7d36a5a4056 (diff) |
- Fix setting pagesizes (#1488295)
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/settings/save_prefs.inc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 36d401ed4..18ef5e7dd 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -149,17 +149,6 @@ switch ($CURR_SECTION) else if ($RCMAIL->config->get('skin') != $a_user_prefs['skin']) $OUTPUT->command('reload', 500); - // force min size - if ($a_user_prefs['mail_pagesize'] < 1) - $a_user_prefs['mail_pagesize'] = 10; - if ($a_user_prefs['addressbook_pagesize'] < 1) - $a_user_prefs['addressbook_pagesize'] = 10; - - if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['mail_pagesize'] > $CONFIG['max_pagesize'])) - $a_user_prefs['mail_pagesize'] = (int) $CONFIG['max_pagesize']; - if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['addressbook_pagesize'] > $CONFIG['max_pagesize'])) - $a_user_prefs['addressbook_pagesize'] = (int) $CONFIG['max_pagesize']; - $a_user_prefs['timezone'] = (string) $a_user_prefs['timezone']; break; @@ -172,6 +161,23 @@ switch ($CURR_SECTION) $a_user_prefs['keep_alive'] = min($CONFIG['session_lifetime']*60, $a_user_prefs['keep_alive']); } + // force min size + if ($a_user_prefs['mail_pagesize'] < 1) + $a_user_prefs['mail_pagesize'] = 10; + + if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['mail_pagesize'] > $CONFIG['max_pagesize'])) + $a_user_prefs['mail_pagesize'] = (int) $CONFIG['max_pagesize']; + + break; + case 'addressbook': + + // force min size + if ($a_user_prefs['addressbook_pagesize'] < 1) + $a_user_prefs['addressbook_pagesize'] = 10; + + if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['addressbook_pagesize'] > $CONFIG['max_pagesize'])) + $a_user_prefs['addressbook_pagesize'] = (int) $CONFIG['max_pagesize']; + break; case 'folders': |