function views_ui_enable_page

Page callback for the Views enable page.

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

File

includes/admin.inc, line 3628

Code

function views_ui_enable_page($view) {
    if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'views-enable')) {
        $views_status = variable_get('views_defaults', array());
        $views_status[$view->name] = FALSE;
        // false is enabled
        variable_set('views_defaults', $views_status);
        views_invalidate_cache();
        menu_rebuild();
        drupal_goto('admin/build/views');
    }
    else {
        return drupal_access_denied();
    }
}