function views_ui_disable_page

2.x admin.inc views_ui_disable_page($view)

Page callback for the Views enable page

1 string reference to 'views_ui_disable_page'

File

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

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();
  }
}