You are here

function data_ui_compare in Data 6

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

Comparison page.

1 string reference to 'data_ui_compare'
data_ui_menu in data_ui/data_ui.module
Implementation of hook_menu()

File

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

Code

function data_ui_compare() {
  $rows = array();
  $tables = data_get_all_tables();
  foreach ($tables as $table) {
    $row = array();
    $comp = $table
      ->compareSchema();
    $row[] = check_plain($table
      ->get('name'));
    $status = $comp['status'];
    if ($status != 'same') {
      $status .= ' - ' . l(t('adjust'), 'admin/build/data/compare/' . $table
        ->get('name'));
    }
    $row[] = $status;
    $row[] = empty($comp['warning']) ? '-' : $comp['warning'];
    $rows[] = $row;
  }
  $header = array(
    t('Name'),
    t('Status'),
    t('Warnings'),
  );
  return theme('table', $header, $rows);
}