diff options
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/poll.module b/modules/poll.module index 9a956e466..d9c4f6f90 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -380,14 +380,11 @@ function theme_poll_results($title, $results, $votes, $links, $block, $nid, $vot $output .= '<div class="poll">'; $output .= $results; $output .= '<div class="total">'. t('Total votes: %votes', array('%votes' => $votes)) .'</div>'; - if (isset($vote) && $vote > -1) { - if (user_access('cancel own vote')) { - $form['#action'] = url("poll/cancel/$nid"); - $form['choice'] = array('#type' => 'hidden', '#value' => $vote); - $form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote')); - $output .= drupal_get_form('poll_cancel_form', $form); - } - $output .= '</div>'; + if (isset($vote) && $vote > -1 && user_access('cancel own vote')) { + $form['#action'] = url("poll/cancel/$nid"); + $form['choice'] = array('#type' => 'hidden', '#value' => $vote); + $form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote')); + $output .= drupal_get_form('poll_cancel_form', $form); } $output .= '</div>'; } |