function update_fix_compatibility

Disables any extensions that are incompatible with the current core version.

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

File

drupal/core/includes/update.inc, line 30
Drupal database update API.

Code

function update_fix_compatibility() {
  foreach (array(
    'module',
    'theme',
  ) as $type) {
    $config = config("system.{$type}");
    $save = FALSE;
    foreach ($config
      ->get('enabled') as $name => $weight) {
      if (update_check_incompatibility($name, $type)) {
        $config
          ->clear("enabled.{$name}");
        $save = TRUE;
      }
    }
    if ($save) {
      if ($type == 'module') {
        $config
          ->set('enabled', module_config_sort($config
          ->get('enabled')));
      }
      $config
        ->save();
    }
  }
}