diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-23 18:47:23 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-23 18:47:23 +0200 |
commit | 07795ba12413ff75e15cd17d89a12ac6f49f74e9 (patch) | |
tree | 0e2c44b85e067da1369a58a159f02dcbc21fc60f | |
parent | 6ae92aa169b449654b374cf6fb5be0d08ff61b8c (diff) |
Fix invalid option selected in default_font selector when font is unset (#1489112)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/main.inc.php.dist | 2 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 2 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 9 |
5 files changed, 9 insertions, 7 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix invalid option selected in default_font selector when font is unset (#1489112) - Fix displaying contact with ID divisible by 100 in sql addressbook (#1489121) - Fix browser warnings on PDF plugin detection (#1489118) - Fix fatal error when parsing UUencoded messages (#1489119) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index da5c5f340..4a73ff119 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -888,7 +888,7 @@ $rcmail_config['autocomplete_single'] = false; // Default font for composed HTML message. // Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New, // Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana -$rcmail_config['default_font'] = ''; +$rcmail_config['default_font'] = 'Verdana'; // Enables display of email address with name instead of a name (and address in title) $rcmail_config['message_show_email'] = false; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 5e1d95d8a..9ee57d31e 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 860f36c35..ce86b1cd6 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -664,14 +664,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>'; |