summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-05 12:05:05 +0000
committeralecpl <alec@alec.pl>2010-03-05 12:05:05 +0000
commite55ab02682caf150359e1d1642022b565e9e65f9 (patch)
tree1ae28df0c7115957acabc94b163254c4b3bdc704 /program/steps/settings
parentb7f952248e47c126406044ab26829133d3184429 (diff)
- Add 'default_charset' option to user preferences (#1485451)
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/func.inc11
-rw-r--r--program/steps/settings/save_prefs.inc3
2 files changed, 13 insertions, 1 deletions
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));