summaryrefslogtreecommitdiff
path: root/modules/poll/poll.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-01-11 23:27:05 -0500
committerwebchick <webchick@24967.no-reply.drupal.org>2012-01-11 23:27:05 -0500
commitd48aa54c3a795ea2a313d09b0f6c74a702f2ed2d (patch)
treeb340bd318790db44a1732eabff0ced555b727b7f /modules/poll/poll.module
parent371991597778094590ef37a87f4b57a65225797e (diff)
downloadbrdo-d48aa54c3a795ea2a313d09b0f6c74a702f2ed2d.tar.gz
brdo-d48aa54c3a795ea2a313d09b0f6c74a702f2ed2d.tar.bz2
Issue #1274212 by amateescu, c31ck: Fixed Incorrect order of choices in Poll module.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r--modules/poll/poll.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 48001d099..614bb9240 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -288,9 +288,10 @@ function poll_form($node, &$form_state) {
// Add initial or additional choices.
$existing_delta = $delta;
- $weight++;
for ($delta; $delta < $choice_count; $delta++) {
$key = 'new:' . ($delta - $existing_delta);
+ // Increase the weight of each new choice.
+ $weight++;
$form['choice_wrapper']['choice'][$key] = _poll_choice_form($key, NULL, '', 0, $weight, $choice_count);
}