Commit da5aa80e authored by catch's avatar catch

Issue #1331370 by beejeebus, plach: Fixed [Upgrade path broken] Stored include...

Issue #1331370 by beejeebus, plach: Fixed [Upgrade path broken] Stored include paths need to be updated to /core before running the upgrade path.
parent 7500befb
......@@ -101,6 +101,12 @@ function update_prepare_d8_bootstrap() {
),
);
if ($has_required_schema) {
// Bootstrap variables so we can update theme while preparing the update
// process.
drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
// Update the dynamic include paths that might be used before running the
// proper update functions.
update_prepare_stored_includes();
// Update the environment for the language bootstrap if needed.
update_prepare_d8_language();
......@@ -127,6 +133,22 @@ function update_prepare_d8_bootstrap() {
}
}
/**
* Fix stored include paths to match the "/core" migration.
*/
function update_prepare_stored_includes() {
// Update language negotiation settings.
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);
}
}
/**
* Prepare Drupal 8 language changes for the bootstrap if needed.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment