You are here

function theme_status_report in Drupal 5

Same name and namespace in other branches
  1. 6 modules/system/system.admin.inc \theme_status_report()
  2. 7 modules/system/system.admin.inc \theme_status_report()

Theme status report

1 theme call to theme_status_report()
system_status in modules/system/system.module
Menu callback: displays the site status report. Can also be used as a pure check.

File

modules/system/system.module, line 1866
Configuration system that lets administrators modify the workings of the site.

Code

function theme_status_report(&$requirements) {
  $i = 0;
  $output = '<table class="system-status-report">';
  foreach ($requirements as $requirement) {
    if ($requirement['#type'] == '') {
      $class = ++$i % 2 == 0 ? 'even' : 'odd';
      $classes = array(
        REQUIREMENT_INFO => 'info',
        REQUIREMENT_OK => 'ok',
        REQUIREMENT_WARNING => 'warning',
        REQUIREMENT_ERROR => 'error',
      );
      $class = $classes[(int) $requirement['severity']] . ' ' . $class;

      // Output table row(s)
      if ($requirement['description']) {
        $output .= '<tr class="' . $class . ' merge-down"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
        $output .= '<tr class="' . $class . ' merge-up"><td colspan="2">' . $requirement['description'] . '</td></tr>';
      }
      else {
        $output .= '<tr class="' . $class . '"><th>' . $requirement['title'] . '</th><td>' . $requirement['value'] . '</td></tr>';
      }
    }
  }
  $output .= '</table>';
  return $output;
}