thomascube
2007-12-10 fba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131
program/steps/settings/save_prefs.inc
@@ -5,7 +5,7 @@
 | program/steps/settings/save_prefs.inc                                 |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005, RoundCube Dev. - Switzerland                      |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -42,14 +42,18 @@
  rcmail_set_locale($sess_user_lang);
  }
if (rcmail_save_user_prefs($a_user_prefs))
  show_message('successfullysaved', 'confirmation');
// 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 ($USER->save_prefs($a_user_prefs))
  $OUTPUT->show_message('successfullysaved', 'confirmation');
// go to next step
$_action = 'preferences';
// overwrite action variable
$OUTPUT->add_script(sprintf("\n%s.set_env('action', '%s');", $JS_OBJECT_NAME, $_action));
rcmail_overwrite_action('preferences');
?>