You are here

function update_fix_compatibility in Drupal 6

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

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

1 call to update_fix_compatibility()
update.php in ./update.php
Administrative page for handling updates from one Drupal version to another.

File

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

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;
    }
  }
  if (!empty($incompatible)) {
    $ret[] = update_sql("UPDATE {system} SET status = 0 WHERE name IN ('" . implode("','", $incompatible) . "')");
  }
  return $ret;
}