You are here

function update_check_requirements in Drupal 6

Same name and namespace in other branches
  1. 8 core/includes/update.inc \update_check_requirements()
  2. 7 update.php \update_check_requirements()
  3. 9 core/includes/update.inc \update_check_requirements()

Check update requirements and report any errors.

1 call to update_check_requirements()
update.php in ./update.php
Administrative page for handling updates from one Drupal version to another.

File

./update.php, line 570
Administrative page for handling updates from one Drupal version to another.

Code

function update_check_requirements() {

  // Check the system module requirements only.
  $requirements = module_invoke('system', 'requirements', 'update');
  $severity = drupal_requirements_severity($requirements);

  // If there are issues, report them.
  if ($severity != REQUIREMENT_OK) {
    foreach ($requirements as $requirement) {
      if (isset($requirement['severity']) && $requirement['severity'] != REQUIREMENT_OK) {
        $message = isset($requirement['description']) ? $requirement['description'] : '';
        if (isset($requirement['value']) && $requirement['value']) {
          $message .= ' (Currently using ' . $requirement['title'] . ' ' . $requirement['value'] . ')';
        }
        drupal_set_message($message, 'warning');
      }
    }
  }
}