From 56a7940f26341fa0b33d9b5871e04e92ac2e9ba9 Mon Sep 17 00:00:00 2001 From: till Date: Sat, 1 Sep 2007 14:55:10 +0000 Subject: + implemented checks for max pagesize (#1484484) git-svn-id: https://svn.roundcube.net/trunk@768 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/settings/save_prefs.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/steps/settings/save_prefs.inc b/roundcubemail/program/steps/settings/save_prefs.inc index 43285e586..0565260f0 100644 --- a/roundcubemail/program/steps/settings/save_prefs.inc +++ b/roundcubemail/program/steps/settings/save_prefs.inc @@ -47,6 +47,10 @@ if ($a_user_prefs['pagesize'] < 1) { $a_user_prefs['pagesize'] = 10; } +if (isset($CONFIG['max_pagesize']) && ($a_user_prefs['pagesize'] > $CONFIG['max_pagesize'])) + { + $a_user_prefs['pagesize'] = (int) $CONFIG['max_pagesize']; + } if (rcmail_save_user_prefs($a_user_prefs)) $OUTPUT->show_message('successfullysaved', 'confirmation'); -- cgit v1.2.3