You are here

function views_ui_admin_disable_page in Views (for Drupal 7) 5

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

File

./views_ui.module, line 373

Code

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