You are here

function data_ui_adopt_form_submit in Data 6

Same name and namespace in other branches
  1. 7 data_ui/data_ui.admin.inc \data_ui_adopt_form_submit()

Submit handler for adopt table form.

File

data_ui/data_ui.admin.inc, line 269
Admin UI functions.

Code

function data_ui_adopt_form_submit($form, &$form_state) {
  data_include('DataTable');
  $tables = array_keys(array_filter($form_state['values']['orphaned_tables']));
  foreach ($tables as $table_name) {
    $table = DataTable::instance($table_name);
    $table
      ->adopt();
    unset($table);
  }
  DataTable::clearCaches();
  $form_state['redirect'] = 'admin/build/data';
}