Commit 0a34677d authored by merlinofchaos's avatar merlinofchaos

Fix problem grabbing incorrect data from cache

parent 7c3c7c51
......@@ -1619,7 +1619,14 @@ function views_ui_edit_display($js, $view, $display_id, $section) {
if (!empty($form_state['regenerate form'])) {
$form_state['input'] = array(); // Remove the input so it can't post.
$form_state['executed'] = FALSE;
if (!empty($form_state['next'])) {
$form_state['section'] = $form_state['next'];
}
$object = views_ajax_form_wrapper('views_ui_edit_display_form', $form_state);
if (!empty($form_state['next'])) {
$object->url = url("admin/build/views/ajax/display/$view->name/$display_id/$form_state[next]");
}
}
// regenerate all tabs because changes to the default tab could ripple.
return views_ui_regenerate_tabs($view, NULL, $object);
......
......@@ -31,7 +31,11 @@ function _views_fetch_data($table = NULL) {
// NOTE: This happens whether we retrieve them from cache or otherwise.
views_include_handlers();
$cache = views_cache_get('views_data');
$data = views_cache_get('views_data');
if (!empty($data->data)) {
$cache = $data->data;
}
if (empty($cache)) {
$cache = module_invoke_all('views_data');
foreach (module_implements('views_data_alter') as $module) {
......
......@@ -1241,8 +1241,13 @@ class views_plugin_display extends views_plugin {
$row_options = array();
$plugin->init($this->view, $this->display);
$plugin->options($row_options);
// @todo -- change this
$this->set_option('row_options', $row_options);
// send ajax form to options page if we use it.
if (!empty($plugin->definition['uses options'])) {
$form_state['next'] = 'style_options';
$form_state['regenerate form'] = TRUE;
}
}
}
break;
......@@ -1256,8 +1261,13 @@ class views_plugin_display extends views_plugin {
$style_options = array();
$plugin->init($this->view, $this->display);
$plugin->options($style_options);
// @todo -- change this
$this->set_option('style_options', $style_options);
// send ajax form to options page if we use it.
if (!empty($plugin->definition['uses options'])) {
$form_state['next'] = 'style_options';
$form_state['regenerate form'] = TRUE;
}
}
}
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