Currently, the upgrade path from Drupal 6 to 7 is not supported. Drupal 7 added context to the overrides, so we'll have to push all the Drupal 6 string overrides to one level deeper.

CommentFileSizeAuthor
#2 upgradepath.patch1.7 KBRobLoach
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BenK’s picture

Subscribing...

RobLoach’s picture

RobLoach’s picture

Status: Needs review » Fixed
/**
 * Update to Drupal 7. This will add the context support to custom strings.
 */
function stringoverrides_update_7000() {
  $ret = array();

  // Retrieve all existing overrides.
  $or = db_or()
    ->condition('name', 'locale_custom_strings_%', 'LIKE')
    ->condition('name', 'locale_custom_disabled_strings_%', 'LIKE');
  $result = db_select('variable', 'v')
    ->fields('v')
    ->condition($or)
    ->execute();

  // Push the overrides one level deeper for context support.
  foreach ($result as $variable) {
    // Retrieve the value using variable_get so that it's unserialized.
    $overrides = variable_get($variable->name, array());
    // Save the value back into the variables table with the context support.
    variable_set($variable->name, array('' => $overrides));
  }
  return $ret;
}

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.