You are here

function update_check_incompatibility in Drupal 6

Same name and namespace in other branches
  1. 8 core/includes/update.inc \update_check_incompatibility()
  2. 7 includes/update.inc \update_check_incompatibility()
  3. 9 core/includes/update.inc \update_check_incompatibility()

Helper function to test compatibility of a module or theme.

2 calls to update_check_incompatibility()
update_fix_compatibility in ./update.php
Disable anything in the {system} table that is not compatible with the current version of Drupal core.
update_script_selection_form in ./update.php

File

./update.php, line 448
Administrative page for handling updates from one Drupal version to another.

Code

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;
}