diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-08-23 23:39:37 +0100 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-08-23 23:39:37 +0100 |
commit | 23c31ac7141f3d8be913705ae269b22187623d98 (patch) | |
tree | 4d465518e085aae12c938c3aac59395cc48526c6 /includes | |
parent | cf9c0729fa3620669c99e5675192399f32824852 (diff) | |
download | brdo-23c31ac7141f3d8be913705ae269b22187623d98.tar.gz brdo-23c31ac7141f3d8be913705ae269b22187623d98.tar.bz2 |
Issue #1164852 follow-up by plach, chx, Boobaa, sun: Fixed critical regression: Node bodies display as empty after upgrade to 7.7 from 6.x if the nodes have a language.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/update.inc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/includes/update.inc b/includes/update.inc index 1fbd8074a..35be17ab2 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -178,6 +178,14 @@ function update_prepare_d7_bootstrap() { $_COOKIE[session_name()] = $sid; session_id($sid); } + + // Upgrading from D6 to D7.{0,1,2,3,4,8,...} is different than upgrading + // from D6 to D7.{5,6,7} which should be considered broken. To be able to + // properly handle this difference in node_update_7012 we need to keep track + // of whether a D6 > D7 upgrade or a D7 > D7 update is running. + // Since variable_set() is not available here, the D6 status is being saved + // in a local variable to be able to store it later. + $update_d6 = TRUE; } // Create the registry tables. @@ -302,6 +310,11 @@ function update_prepare_d7_bootstrap() { // Set the timezone for this request only. $GLOBALS['conf']['date_default_timezone'] = 'UTC'; } + + // This allows update functions to tell if an upgrade from D6 is running. + if (!empty($update_d6)) { + variable_set('update_d6', TRUE); + } } /** @@ -1081,6 +1094,10 @@ function update_batch($start, $redirect = NULL, $url = NULL, $batch = array(), $ * @see update_batch() */ function update_finished($success, $results, $operations) { + // Remove the D6 upgrade flag variable so that subsequent update runs do not + // get the wrong context. + variable_del('update_d6'); + // Clear the caches in case the data has been updated. drupal_flush_all_caches(); |