install_verify_requirements(&$install_state)Installation task; verify the requirements for installing Drupal.
$install_state An array of information about the current installation state.
A themed status report, or an exception if there are requirement errors. Otherwise, no output is returned, so that the next task can be run in the same page request.
includes/install.core.inc, line 704
<?php
function install_verify_requirements(&$install_state) {
// Check the installation requirements for Drupal and this profile.
$requirements = install_check_requirements($install_state);
// Verify existence of all required modules.
$requirements += drupal_verify_profile($install_state);
// Check the severity of the requirements reported.
$severity = drupal_requirements_severity($requirements);
if ($severity == REQUIREMENT_ERROR) {
if ($install_state['interactive']) {
drupal_set_title(st('Requirements problem'));
$status_report = theme('status_report', array('requirements' => $requirements));
$status_report .= st('Check the error messages and <a href="!url">proceed with the installation</a>.', array('!url' => check_url(request_uri())));
return $status_report;
}
else {
// Throw an exception showing all unmet requirements.
$failures = array();
foreach ($requirements as $requirement) {
if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) {
$failures[] = $requirement['title'] . ': ' . $requirement['value'] . "\n\n" . $requirement['description'];
}
}
throw new Exception(implode("\n\n", $failures));
}
}
}
?>