summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-23 18:47:23 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-23 18:48:24 +0200
commit2f39634b0a31ce4d764c0e44b4eb2dcc144b3a4a (patch)
treede22a5a94d1c58d8b1bf27d603d88ba37927fe5d /program/steps
parente3cbe5dd62d9438433b039d682bd8b8215cc1d69 (diff)
Fix invalid option selected in default_font selector when font is unset (#1489112)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc2
-rw-r--r--program/steps/mail/sendmail.inc2
-rw-r--r--program/steps/settings/func.inc9
3 files changed, 7 insertions, 6 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 5a1b65ade..3787da372 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -143,7 +143,7 @@ $OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0);
$OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ',')));
// default font for HTML editor
-$font = rcube_fontdefs($RCMAIL->config->get('default_font', 'Verdana'));
+$font = rcube_fontdefs($RCMAIL->config->get('default_font'));
if ($font && !is_array($font)) {
$OUTPUT->set_env('default_font', $font);
}
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 2f96e930f..cb3a40524 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -479,7 +479,7 @@ $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST);
$message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset);
if ($isHtml) {
- $font = rcube_fontdefs($RCMAIL->config->get('default_font', 'Verdana'));
+ $font = rcube_fontdefs($RCMAIL->config->get('default_font'));
$bstyle = $font && is_string($font) ? " style='font-family: $font'" : '';
// append doctype and html/body wrappers
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 319c58db9..981d4e406 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -653,14 +653,15 @@ function rcmail_user_prefs($current=null)
}
if (!isset($no_override['default_font'])) {
- $field_id = 'rcmfd_default_font';
- $fonts = rcube_fontdefs();
- $default_font = $config['default_font'] ? $config['default_font'] : 'Verdana';
+ $field_id = 'rcmfd_default_font';
+ $fonts = rcube_fontdefs();
+ $selected = $config['default_font'];
$select = '<select name="_default_font" id="'.$field_id.'">';
+ $select .= '<option value=""' . (!$selected ? ' selected="selected"' : '') . '>---</option>';
foreach ($fonts as $fname => $font)
$select .= '<option value="'.$fname.'"'
- . ($fname == $default_font ? ' selected="selected"' : '')
+ . ($fname == $selected ? ' selected="selected"' : '')
. ' style=\'font-family: ' . $font . '\'>'
. Q($fname) . '</option>';
$select .= '</select>';