function update_fix_compatibility

8.0.x update_6.inc update_fix_compatibility()
6.x update_6.inc update_fix_compatibility()
7.x update_6.inc update_fix_compatibility()
3.x update_6.inc update_fix_compatibility()
4.x update_6.inc update_fix_compatibility()
5.x update_6.inc update_fix_compatibility()

Disable anything in the {system} table that is not compatible with the current version of Drupal core.

2 calls to update_fix_compatibility()
update_main_prepare in commands/core/drupal/update_6.inc
update_main_prepare in commands/core/drupal/update_7.inc

File

commands/core/drupal/update_6.inc, line 125
Update.php for provisioned sites. This file is a derivative of the standard drupal update.php, which has been modified to allow being run from the command line.

Code

function update_fix_compatibility() {
  $ret = array();
  $incompatible = array();
  $query = db_query("SELECT name, type, status FROM {system} WHERE status = 1 AND type IN ('module','theme')");
  while ($result = db_fetch_object($query)) {
    if (update_check_incompatibility($result->name, $result->type)) {
      $incompatible[] = $result->name;
      drush_log(dt("%type %name is incompatible with this release of Drupal, and will be disabled.", array("%type" => $result->type, '%name' => $result->name)), "warning");
    }
  }
  if (!empty($incompatible)) {

    $ret[] = update_sql("UPDATE {system} SET status = 0 WHERE name IN ('" . implode("','", $incompatible) . "')");
  }
  return $ret;
}