summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Wehner2011-06-13 22:09:40 (GMT)
committer Daniel Wehner2011-06-13 22:09:40 (GMT)
commitdc1d1b9b3eca8c7f82594e31734d1805c4b5cf4d (patch)
treec01efaeb376bb4548dbb8b356444822a31d77419
parent17ce26dcfa43e6aff08ea38864fe85d0b17cab8e (diff)
#1187498 by dereine: Allow to override and change the value.
-rw-r--r--includes/admin.inc18
1 files changed, 4 insertions, 14 deletions
diff --git a/includes/admin.inc b/includes/admin.inc
index de7976e..440f4bd 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -2485,20 +2485,13 @@ function views_ui_standard_submit($form, &$form_state) {
if ($was_defaulted === $is_defaulted) {
// We're not changing which display these form values apply to.
// Run the regular submit handler for this form.
- $submit_handler = $form['#form_id'] . '_submit';
- if (function_exists($submit_handler)) {
- $submit_handler($form, $form_state);
- }
}
elseif ($was_defaulted && !$is_defaulted) {
// We were using the default display's values, but we're now overriding
// the default display and saving values specific to this display.
- // TODO: Document why the regular form submit handler isn't necessary in
- // this case.
$display = &$form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
$display->handler->options_submit($form, $form_state);
- views_ui_cache_set($form_state['view']);
}
elseif (!$was_defaulted && $is_defaulted) {
// We used to have an override for this display, but the user now wants
@@ -2508,14 +2501,11 @@ function views_ui_standard_submit($form, &$form_state) {
$display = &$form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
$display->handler->options_submit($form, $form_state);
+ }
- // TODO: This is copy/paste code. Refactor.
- $submit_handler = $form['#form_id'] . '_submit';
- if (function_exists($submit_handler)) {
- $submit_handler($form, $form_state);
- }
-
- views_ui_cache_set($form_state['view']);
+ $submit_handler = $form['#form_id'] . '_submit';
+ if (function_exists($submit_handler)) {
+ $submit_handler($form, $form_state);
}
}