_system_is_incompatible

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/system/system.admin.inc, строка 572

Версии
6
_system_is_incompatible(&$incompatible, $files, $file)

Recursively check compatibility.

Параметры

$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.

Возвращаемое значение

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

▾ 2 функции вызывают _system_is_incompatible()

system_modules in modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
_system_is_incompatible in modules/system/system.admin.inc
Recursively check compatibility.

Код

<?php
function _system_is_incompatible(&$incompatible, $files, $file) {
  static $seen;
  // We need to protect ourselves in case of a circular dependency.
  if (isset($seen[$file->name])) {
    return isset($incompatible[$file->name]);
  }
  $seen[$file->name] = TRUE;
  if (isset($incompatible[$file->name])) {
    return TRUE;
  }
  // The 'dependencies' key in .info files was a string in Drupal 5, but changed
  // to an array in Drupal 6. If it is not an array, the module is not
  // compatible and we can skip the check below which requires an array.
  if (!is_array($file->info['dependencies'])) {
    $file->info['dependencies'] = array();
    $incompatible[$file->name] = TRUE;
    return TRUE;
  }
  // Recursively traverse the dependencies, looking for incompatible modules
  foreach ($file->info['dependencies'] as $dependency) {
    if (isset($files[$dependency]) && _system_is_incompatible($incompatible, $files, $files[$dependency])) {
      $incompatible[$file->name] = TRUE;
      return TRUE;
    }
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему