function update_check_incompatibility
Same name in other branches
- 9 core/includes/update.inc \update_check_incompatibility()
- 8.9.x core/includes/update.inc \update_check_incompatibility()
Tests the compatibility of a module or theme.
2 calls to update_check_incompatibility()
- update_fix_compatibility in includes/
update.inc - Disable any items in the {system} table that are not core compatible.
- update_get_update_list in includes/
update.inc - Returns a list of all the pending database updates.
File
-
includes/
update.inc, line 43
Code
function update_check_incompatibility($name, $type = 'module') {
static $themes, $modules;
// Store values of expensive functions for future use.
if (empty($themes) || empty($modules)) {
// We need to do a full rebuild here to make sure the database reflects any
// code changes that were made in the filesystem before the update script
// was initiated.
$themes = system_rebuild_theme_data();
$modules = system_rebuild_module_data();
}
if ($type == 'module' && isset($modules[$name])) {
$file = $modules[$name];
}
elseif ($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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.