diff --git a/styles/templates/default/viewtopic_poll.tpl b/styles/templates/default/viewtopic_poll.tpl
index 746e1718..13d2e877 100644
--- a/styles/templates/default/viewtopic_poll.tpl
+++ b/styles/templates/default/viewtopic_poll.tpl
@@ -126,10 +126,10 @@ function html2text (str)
-
+
-
+
[ {L_NEW_POLL_END} ]
@@ -147,4 +147,4 @@ function html2text (str)
-
\ No newline at end of file
+
diff --git a/viewtopic.php b/viewtopic.php
index 387d9edf..0d4a6548 100644
--- a/viewtopic.php
+++ b/viewtopic.php
@@ -644,6 +644,7 @@ if ($topic_has_poll)
{
$template->assign_vars(array(
'SHOW_VOTE_BTN' => poll_is_active($t_data),
+ 'POLL_ALREADY_VOTED' => (bool) DB()->fetch_row("SELECT 1 FROM ". BB_POLL_USERS ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']} LIMIT 1"),
'POLL_VOTES_JS' => $poll_votes_js,
));
}