function views_ui_edit_view_form_submit

3.x admin.inc views_ui_edit_view_form_submit($form, &$form_state)
2.x admin.inc views_ui_edit_view_form_submit($form, &$form_state)

Submit handler for the edit view form.

1 string reference to 'views_ui_edit_view_form_submit'
views_ui_edit_view_form in includes/admin.inc
The main edit view form, which is really just a save/cancel/delete button.

File

includes/admin.inc, line 929
admin.inc Provides the Views' administrative interface.

Code

function views_ui_edit_view_form_submit($form, &$form_state) {
  // Go through and remove displayed scheduled for removal.
  foreach ($form_state['view']->display as $id => $display) {
    if (!empty($display->deleted)) {
      unset($form_state['view']->display[$id]);
    }
  }

  $form_state['view']->save();
  drupal_set_message(t('The view %name has been saved.', array('%name' => $form_state['view']->name)));

  // Make sure menu items get rebuilt as neces
  menu_rebuild();

  // Clear the views cache.
  cache_clear_all('*', 'cache_views');

  // Clear the page cache.
  cache_clear_all();

  // Remove this view from cache so we can edit it properly.
  views_object_cache_clear('view', $form_state['view']->name);
}