]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/settings/save_prefs.inc
Imported Upstream version 0.1~rc2
[roundcube.git] / program / steps / settings / save_prefs.inc
index 0f073b334ca21b1cebc4a6c374bf1a4f7d22d601..9b65af02dac3a736b63fb606ae2cde58cd9562ab 100644 (file)
@@ -15,7 +15,7 @@
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id: save_prefs.inc 543 2007-04-28 18:07:12Z thomasb $
+ $Id: save_prefs.inc 768 2007-09-01 14:55:10Z till $
 
 */
 
@@ -42,6 +42,16 @@ if (isset($_POST['_language']))
   rcmail_set_locale($sess_user_lang);
   }
 
+// force min size
+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');