From e55ab02682caf150359e1d1642022b565e9e65f9 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 5 Mar 2010 12:05:05 +0000 Subject: - Add 'default_charset' option to user preferences (#1485451) --- program/steps/settings/func.inc | 11 +++++++++++ program/steps/settings/save_prefs.inc | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'program/steps/settings') diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 91e1e3fd5..44225c715 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -368,6 +368,17 @@ function rcmail_user_prefs($current=null) ); } + if (!isset($no_override['default_charset'])) { + $field_id = 'rcmfd_default_charset'; + + $blocks['main']['options']['default_charset'] = array( + 'title' => html::label($field_id, Q(rcube_label('defaultcharset'))), + 'content' => $RCMAIL->output->charset_selector(array( + 'name' => '_default_charset', 'selected' => $config['default_charset'] + )) + ); + } + if (!isset($no_override['show_images'])) { $field_id = 'rcmfd_show_images'; $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id)); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 8f0a0e711..eeb64034c 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -54,8 +54,10 @@ switch ($CURR_SECTION) 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE, 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, 'display_next' => isset($_POST['_display_next']) ? TRUE : FALSE, + 'default_charset' => get_input_value('_default_charset', RCUBE_INPUT_POST), ); + break; case 'compose': $a_user_prefs = array( @@ -92,7 +94,6 @@ switch ($CURR_SECTION) break; } - $data = rcmail::get_instance()->plugins->exec_hook('save_preferences', array('prefs' => $a_user_prefs, 'section' => $CURR_SECTION)); -- cgit v1.2.3