summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2010-12-10 00:57:38 (GMT)
committer Earl Miles2010-12-10 00:57:38 (GMT)
commit4863c8134d2ec9c7dbad22af55f3751feae731ba (patch)
tree8c73b086fc2973f221370bd8534c2e00eed10bcb
parentd2e8a07c84813f717c0d74ace1ed15da4e287544 (diff)
#779668 by esteewhy: Fix not technically valid use of break statements.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--includes/admin.inc57
2 files changed, 29 insertions, 29 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7502212..23a1843 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 aa81dd9..9801c0e 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;