function views_ui_add_form_submit

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

Process the add view form

1 string reference to 'views_ui_add_form_submit'
views_ui_add_form in includes/admin.inc
Form constructor callback to create the views Add Form, phase 1.

File

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

Code

function views_ui_add_form_submit($form, &$form_state) {
  $view = $form_state['view'] ? $form_state['view'] : views_new_view();
  $view->name = $form_state['values']['name'];
  $view->description = $form_state['values']['description'];
  $view->tag = $form_state['values']['tag'];
  $view->core = VERSION;
  if (empty($form['base_table']['#disabled'])) {
    $view->base_table = $form_state['values']['base_table'];
  }

  views_ui_cache_set($view);
  $form_state['redirect'] = 'admin/build/views/edit/' . $view->name;
}