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 /program/steps/settings/func.inc | |
parent | 6ae92aa169b449654b374cf6fb5be0d08ff61b8c (diff) |
Fix invalid option selected in default_font selector when font is unset (#1489112)
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r-- | program/steps/settings/func.inc | 9 |
1 files changed, 5 insertions, 4 deletions
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>'; |