You are here

function views_ui_convert_cleanup_form_submit in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 includes/convert.inc \views_ui_convert_cleanup_form_submit()

File

includes/convert.inc, line 93
convert.inc

Code

function views_ui_convert_cleanup_form_submit($form, $form_state) {
  if (empty($form_state['values']['verify'])) {
    drupal_set_message('Please check the box to verify you want to destroy your Views 1 table data.');
    return;
  }
  $ret = array();
  if (db_table_exists('view_view')) {
    db_drop_table($ret, 'view_view');
  }
  if (db_table_exists('view_sort')) {
    db_drop_table($ret, 'view_sort');
  }
  if (db_table_exists('view_argument')) {
    db_drop_table($ret, 'view_argument');
  }
  if (db_table_exists('view_tablefield')) {
    db_drop_table($ret, 'view_tablefield');
  }
  if (db_table_exists('view_filter')) {
    db_drop_table($ret, 'view_filter');
  }
  if (db_table_exists('view_exposed_filter')) {
    db_drop_table($ret, 'view_exposed_filter');
  }
  drupal_set_message(t('All Views 1 tables have been removed.'));
}