summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 11:19:06 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 11:19:06 -0800
commit664598e0c8091b1eb58dfe75243db0924f963ca7 (patch)
tree950ab422e330b83d0c688b064f543fc52d42988a /modules/poll/poll.module
parent3da69625986d0b1a2ae09899ac539ad3ef07e2a3 (diff)
downloadbrdo-664598e0c8091b1eb58dfe75243db0924f963ca7.tar.gz
brdo-664598e0c8091b1eb58dfe75243db0924f963ca7.tar.bz2
Issue #404116 by c31ck, amateescu, neclimdul: Fixed Provide default choices on poll translations.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 614bb9240..f85a7f39b 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -476,6 +476,9 @@ function poll_validate($node, $form) {
function poll_field_attach_prepare_translation_alter(&$entity, $context) {
if ($context['entity_type'] == 'node' && $entity->type == 'poll') {
$entity->choice = $context['source_entity']->choice;
+ foreach ($entity->choice as $i => $options) {
+ $entity->choice[$i]['chvotes'] = 0;
+ }
}
}