summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@php.net>2007-09-01 14:55:10 +0000
committertill <till@php.net>2007-09-01 14:55:10 +0000
commitc1f160203e56c0d5059994981bc8383af43b9b7f (patch)
tree3d727a330757bd3652819440ae0bf54732229995
parent7dce969fcd1a464bd0aef8d051db1e9d3c023140 (diff)
+ implemented checks for max pagesize (#1484484)
-rw-r--r--program/steps/settings/save_prefs.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index 43285e586..0565260f0 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/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');