diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-06 00:24:16 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-06 00:24:16 +0000 |
commit | cf30c78b42058488fb8fb4f535a469285ca31a31 (patch) | |
tree | 4a26806c2eaead66fcf39f3f0665916d5a333a89 /modules/poll/poll.module | |
parent | 8fb6adbc21302e896b1019aad2edd5c87a518a98 (diff) | |
download | brdo-cf30c78b42058488fb8fb4f535a469285ca31a31.tar.gz brdo-cf30c78b42058488fb8fb4f535a469285ca31a31.tar.bz2 |
#362021 by plach, yched, sun: Update field_attach_prepare_translation() for D7 entity API.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 7a8c33395..f273953a4 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -461,11 +461,11 @@ function poll_validate($node, $form) { } /** - * Implements hook_node_prepare_translation(). + * Implements hook_field_attach_prepare_translation_alter(). */ -function poll_node_prepare_translation($node) { - if ($node->type == 'poll') { - $node->choice = $node->translation_source->choice; +function poll_field_attach_prepare_translation_alter(&$entity, $context) { + if ($context['entity_type'] == 'node' && $entity->type == 'poll') { + $entity->choice = $context['source_entity']->choice; } } |