diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7502212301743b3364e64e1b995403a1e72f6c0e..23a1843eedc735532f40179fdcb61af95ea23ea3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -91,6 +91,7 @@ Views 2.x-dev o #751308 by dereine: Provide an administrator warning when option_definition() data is incorrect. o #817360 by John Morahan: Have Analyze button warn if view has no access control. o #833220 by dereine: Properly validate value on date filter. + o #779668 by esteewhy: Fix not technically valid use of break statements. New features o #841260: Introduce a field to evaluate math expressions. Relies on CTools 1.7 (not yet released). diff --git a/includes/admin.inc b/includes/admin.inc index aa81dd9cad3939a07028a516602a536f89b7c8a2..9801c0eb55266cee567933b3dd1018169a5e4e88 100644 --- a/includes/admin.inc +++ b/includes/admin.inc @@ -2563,7 +2563,6 @@ function views_ui_config_item_extra_form(&$form_state) { $handler = views_get_handler($item['table'], $item['field'], $type); if (empty($handler)) { $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field']))); - break; } else { $handler->init($view, $item); @@ -2631,22 +2630,22 @@ function views_ui_change_style_form(&$form_state) { $handler = views_get_handler($item['table'], $item['field'], $type); if (empty($handler)) { $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field']))); - break; } - $handler->init($view, $item); - $types = views_object_types(); - $form['#title'] = t('Change summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); - - $form['#section'] = $display_id . '-' . $type . '-' . $id . '-style-plugin'; + else { + $handler->init($view, $item); + $types = views_object_types(); + $form['#title'] = t('Change summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); - $form['style_plugin'] = array( - '#type' => 'radios', - '#options' => views_fetch_plugin_names('style', 'summary'), - '#default_value' => $item['style_plugin'], - ); + $form['#section'] = $display_id . '-' . $type . '-' . $id . '-style-plugin'; - $form_state['handler'] = &$handler; + $form['style_plugin'] = array( + '#type' => 'radios', + '#options' => views_fetch_plugin_names('style', 'summary'), + '#default_value' => $item['style_plugin'], + ); + $form_state['handler'] = &$handler; + } views_ui_standard_form_buttons($form, $form_state, 'views_ui_change_style_form'); } return $form; @@ -2716,28 +2715,28 @@ function views_ui_config_style_form(&$form_state) { $handler = views_get_handler($item['table'], $item['field'], $type); if (empty($handler)) { $form['markup'] = array('#value' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field']))); - break; } - $handler->init($view, $item); - $types = views_object_types(); - - $form['#title'] = check_plain($view->display[$display_id]->display_title) . ': '; - $form['#title'] .= t('Configure summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); + else { + $handler->init($view, $item); + $types = views_object_types(); - $form['#section'] = $display_id . '-' . $type . '-style-options'; + $form['#title'] = check_plain($view->display[$display_id]->display_title) . ': '; + $form['#title'] .= t('Configure summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); - $plugin = views_get_plugin('style', $item['style_plugin']); - if ($plugin) { - $form['style_options'] = array( - '#tree' => TRUE, - ); - $plugin->init($view, $view->display[$display_id], $item['style_options']); + $form['#section'] = $display_id . '-' . $type . '-style-options'; - $plugin->options_form($form['style_options'], $form_state); - } + $plugin = views_get_plugin('style', $item['style_plugin']); + if ($plugin) { + $form['style_options'] = array( + '#tree' => TRUE, + ); + $plugin->init($view, $view->display[$display_id], $item['style_options']); - $form_state['handler'] = &$handler; + $plugin->options_form($form['style_options'], $form_state); + } + $form_state['handler'] = &$handler; + } views_ui_standard_form_buttons($form, $form_state, 'views_ui_config_style_form'); } return $form;