You are here

function path_entity_translation_upgrade in Entity Translation 7

Implements hook_entity_translation_upgrade().

File

entity_translation_upgrade/entity_translation_upgrade.admin.inc, line 218
Converts node translations into field-based translations.

Code

function path_entity_translation_upgrade($node, $translation) {

  // Update URL aliases.
  db_update('url_alias')
    ->fields(array(
    'source' => 'node/' . $node->nid,
  ))
    ->condition('source', 'node/' . $translation->nid)
    ->execute();
}