function data_ui_adopt_form_submit in Data 7
Same name and namespace in other branches
- 6 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 283 - Admin UI functions.
Code
function data_ui_adopt_form_submit($form, &$form_state) {
$tables = array_keys(array_filter($form_state['values']['orphaned_tables']));
foreach ($tables as $table_name) {
$table = DataTable::instance($table_name);
$table
->adopt();
drupal_set_message(t("Table @table has been adopted.", array(
'@table' => $table
->get('name'),
)));
unset($table);
}
DataTable::clearCaches();
$form_state['redirect'] = 'admin/structure/data';
}