diff --git a/modules/poll.module b/modules/poll.module index 3282d21ea49..5ed349a8a6e 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -115,11 +115,10 @@ function poll_view($node, $main = 0, $block = 0) { foreach ($node->choice as $key => $value) { if ($value) { - if ($main) { - $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; - } - else { + if ($block) { $output .= (!$block ? "
" : "") . check_output($value) . "
" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; + } else { + $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; } } } @@ -140,8 +139,11 @@ function poll_view($node, $main = 0, $block = 0) { $output .= "chid[$key] . "\"> " . check_output($value) . "
"; } } - $output .= ""; - $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + if ($block) { + $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + } else { + $output .= "     
" . form_submit("Vote") . "
" . $footer . "
"; + } $output = form($REQUEST_URI, $output); } diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 3282d21ea49..5ed349a8a6e 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -115,11 +115,10 @@ function poll_view($node, $main = 0, $block = 0) { foreach ($node->choice as $key => $value) { if ($value) { - if ($main) { - $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; - } - else { + if ($block) { $output .= (!$block ? "
" : "") . check_output($value) . "
" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; + } else { + $output .= "
" . check_output($value) . "" . poll_graph($node->chvotes[$key] / $node->maxvotes) . "" . round(($node->chvotes[$key] / $node->totalvotes) * 100) . "%
"; } } } @@ -140,8 +139,11 @@ function poll_view($node, $main = 0, $block = 0) { $output .= "chid[$key] . "\"> " . check_output($value) . "
"; } } - $output .= ""; - $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + if ($block) { + $output .= "
" . form_submit("Vote") . "
" . $footer . "
"; + } else { + $output .= "     
" . form_submit("Vote") . "
" . $footer . "
"; + } $output = form($REQUEST_URI, $output); }