update_check_incompatibility
./update.php, строка 445
- Версии
- 6
update_check_incompatibility($name, $type = 'module')
Вспомогательная функция для проверки совместимости модуля или темы.
Код
<?php
function update_check_incompatibility($name, $type = 'module') {
static $themes, $modules;
// Store values of expensive functions for future use.
if (empty($themes) || empty($modules)) {
$themes = _system_theme_data();
$modules = module_rebuild_cache();
}
if ($type == 'module' && isset($modules[$name])) {
$file = $modules[$name];
}
else if ($type == 'theme' && isset($themes[$name])) {
$file = $themes[$name];
}
if (!isset($file)
|| !isset($file->info['core'])
|| $file->info['core'] != DRUPAL_CORE_COMPATIBILITY
|| version_compare(phpversion(), $file->info['php']) < 0) {
return TRUE;
}
return FALSE;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии