function views_ui_standard_cancel

Same name in other branches
  1. 7.x-3.x includes/admin.inc \views_ui_standard_cancel()

Submit handler for cancel button

1 string reference to 'views_ui_standard_cancel'
views_ui_standard_form_buttons in includes/admin.inc
Provide standard buttons for the forms to make it easy. Also provide a hidden op operator because the forms plugin doesn't seem to properly provide which button was clicked.

File

includes/admin.inc, line 1580

Code

function views_ui_standard_cancel($form, &$form_state) {
    if (!empty($form_state['view']->changed) && isset($form_state['view']->form_cache)) {
        unset($form_state['view']->form_cache);
        views_ui_cache_set($form_state['view']);
    }
    $form_state['redirect'] = 'admin/build/views/edit/' . $form_state['view']->name;
}