diff --git a/core/includes/update.inc b/core/includes/update.inc index c60d0bc..0769272 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -100,6 +100,20 @@ function update_prepare_d8_bootstrap() { 'description' => $has_required_schema ? '' : 'Please update your Drupal 7 installation to the most recent version before attempting to upgrade to Drupal 8', ), ); + if ($has_required_schema) { + // Bootstrap variables so we can update any reference to the file + // 'includes/locale.inc', which now lives at 'core/includes/locale.inc'. + drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES); + foreach (language_types() as $language_type) { + $negotiation = variable_get("language_negotiation_$language_type", array()); + foreach ($negotiation as $id => &$provider) { + if (isset($negotiation[$id]['file']) && $negotiation[$id]['file'] == 'includes/locale.inc') { + $negotiation[$id]['file'] = 'core/includes/locale.inc'; + } + } + variable_set("language_negotiation_$language_type", $negotiation); + } + } } } @@ -142,7 +156,7 @@ function update_module_enable(array $modules) { db_update('system') ->condition('type', 'module') ->condition('name', $module) - ->fields(array('schema_version' => 0)) + ->fields(array('schema_version' => 0, 'status' => 1)) ->execute(); system_list_reset();