From 5d4d3ebd3f0a2e152af7641e0a9cdf3c0ff46742 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 21 Dec 2023 00:33:48 +0700 Subject: [PATCH] Updated --- styles/templates/default/viewtopic_poll.tpl | 6 +++--- viewtopic.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) 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_SUBMIT_VOTE} ]
- +
[ {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, )); }