function views_ui_disable_page

Page callback for the Views enable page

1 string reference to 'views_ui_disable_page'
views_ui_menu in ./views_ui.module

File

includes/admin.inc, line 3645

Code

function views_ui_disable_page($view) {
    if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'views-disable')) {
        $views_status = variable_get('views_defaults', array());
        $views_status[$view->name] = TRUE;
        // True is disabled
        variable_set('views_defaults', $views_status);
        views_invalidate_cache();
        menu_rebuild();
        drupal_goto('admin/build/views');
    }
    else {
        return drupal_access_denied();
    }
}