You are here

function _system_is_incompatible in Drupal 7

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

Recursively check compatibility.

Parameters

$incompatible: An associative array which at the end of the check contains all incompatible files as the keys, their values being TRUE.

$files: The set of files that will be tested.

$file: The file at which the check starts.

Return value

Returns TRUE if an incompatible file is found, NULL (no return value) otherwise.

File

modules/system/system.admin.inc, line 757
Admin page callbacks for the system module.

Code

function _system_is_incompatible(&$incompatible, $files, $file) {
  if (isset($incompatible[$file->name])) {
    return TRUE;
  }

  // Recursively traverse required modules, looking for incompatible modules.
  foreach ($file->requires as $requires) {
    if (isset($files[$requires]) && _system_is_incompatible($incompatible, $files, $files[$requires])) {
      $incompatible[$file->name] = TRUE;
      return TRUE;
    }
  }
}