Commit 3fdd7f62 authored by dragonwize's avatar dragonwize
Browse files

fixed bug with default format selection on existing entries

parent 4b9acb64
......@@ -294,8 +294,10 @@ function better_formats_set_comment_format(&$form) {
}
function better_formats_get_current_format($form) {
// default format to site default in case of error
$format = FILTER_FORMAT_DEFAULT;
foreach (element_children($form) as $key) {
$element = $format = $form['body_field']['format'][$key];
$element = $form[$key];
if ($element['#type'] === 'radio' && isset($element['#default_value'])) {
$format = $element['#default_value'];
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment