min pagesize = 1

This commit is contained in:
toyomoyo 2006-03-16 07:55:22 +00:00
parent 12e01c0ce3
commit e97e16dfe2

View File

@ -33,7 +33,11 @@
if ($post = data_submitted()) {
print_header();
set_user_preference('blogpagesize', optional_param('pagesize', 10, PARAM_INT));
$pagesize = optional_param('pagesize', 10, PARAM_INT);
if ($pagesize < 1 ) {
error ('invalid page size');
}
set_user_preference('blogpagesize', $pagesize);
redirect($referrer, get_string('changessaved'), 1);
exit;
}