function data_ui_adjust_form_submit_alter_table in Data 6
Same name and namespace in other branches
- 7 data_ui/data_ui.admin.inc \data_ui_adjust_form_submit_alter_table()
Submit handler for data_ui_adjust_form().
1 string reference to 'data_ui_adjust_form_submit_alter_table'
- data_ui_adjust_form in data_ui/
data_ui.admin.inc - Adjust table schema form: Present the user with the difference between schema information and the actual schema in the Database and offer three options:
File
- data_ui/
data_ui.admin.inc, line 192 - Admin UI functions.
Code
function data_ui_adjust_form_submit_alter_table($form, &$form_state) {
$resolved = $resolved = array();
if (isset($form['#comparison']['reasons'])) {
foreach ($form['#comparison']['reasons'] as $field_reason) {
try {
data_alter_table($form['#table'], $field_reason);
$resolved[] = $field_reason;
} catch (Exception $e) {
$unresolved[] = $field_reason;
}
}
}
if (count($resolved)) {
drupal_set_message(t('Resolved') . theme('item_list', $resolved));
}
if (count($unresolved)) {
drupal_set_message(t('Could not resolve') . theme('item_list', $unresolved), 'error');
}
}