From c1d27d867935dd682eef01d20f3cb8c07e184c3b Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 8 Jan 2012 10:57:49 +0000 Subject: - Fix setting pagesizes (#1488295) --- program/steps/settings/save_prefs.inc | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'program/steps/settings') 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': -- cgit v1.2.3