You are here

function dba_report_page in Database Administration 7

Display database report.

1 call to dba_report_page()
dba_drush_callback_sqlreport in ./dba.drush.inc
1 string reference to 'dba_report_page'
dba_menu in ./dba.module
Implements hook_menu().

File

./dba.report.inc, line 7

Code

function dba_report_page($drush = FALSE) {
  $output = array();
  $data = new stdClass();
  $data->drush = $drush;
  $data->version = dba_invoke_driver_specific('version', $data, 'report');
  $data->status = dba_invoke_driver_specific('status', $data, 'report');
  $data->variables = dba_invoke_driver_specific('variables', $data, 'report');
  $data->uptime = dba_invoke_driver_specific('uptime', $data, 'report');
  $data->name = dba_invoke_driver_specific('name', $data, 'report');
  $data->driver = dba_invoke_driver_specific('driver', $data, 'report');
  $output = dba_report_header($data);
  $return = dba_invoke_driver_specific('output', $data, 'report');
  if (!empty($return)) {
    $output = array_merge($output, $return);
  }
  $display = '';
  foreach ($output as $line) {
    if (substr($line, 0, 1) == '_') {
      $display .= "\n";
    }
    $display .= $line . "\n";
  }
  if ($drush) {
    return $display;
  }
  else {
    return "<pre>{$display}</pre>";
  }
}