You are here

function prod_check_dbstatus in Production check & Production monitor 6

Same name and namespace in other branches
  1. 7 includes/prod_check.admin.inc \prod_check_dbstatus()

Database status page.

1 string reference to 'prod_check_dbstatus'
prod_check_menu in ./prod_check.module
Implementation of hook_menu()

File

includes/prod_check.admin.inc, line 778

Code

function prod_check_dbstatus() {
  global $db_type, $db_url;

  // TODO: $db_url can be an array as well, no?
  $db_name = trim(parse_url($db_url, PHP_URL_PATH), '/');
  $details = array(
    'status' => array(),
    'tables' => array(),
    'databases' => array(),
  );
  switch ($db_type) {
    case 'mysql':
    case 'mysqli':
      $output = _prod_check_dbstatus_mysql($db_type, $db_name, $details);
      break;
    case 'pgsql':
      $output = _prod_check_dbstatus_pgsql($db_name, $details);
      break;
    default:
      $title = t('Unsupported database type.');
      $output = theme('prod_check_dbstatus', $title, NULL, $details);
      break;
  }
  return $output;
}