mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Hide vote button in poll if user already voted (#1235)
* Hide vote button in poll if user already voted * Update viewtopic.php * Update CHANGELOG.md
This commit is contained in:
parent
7a7334879c
commit
428984524e
5 changed files with 20 additions and 6 deletions
|
@ -552,7 +552,8 @@ if ($topic_has_poll) {
|
|||
$template->assign_vars(['TOPIC_HAS_POLL' => false]);
|
||||
} else {
|
||||
$template->assign_vars([
|
||||
'SHOW_VOTE_BTN' => \TorrentPier\Legacy\Poll::poll_is_active($t_data),
|
||||
'SHOW_VOTE_BTN' => \TorrentPier\Legacy\Poll::pollIsActive($t_data),
|
||||
'POLL_ALREADY_VOTED' => \TorrentPier\Legacy\Poll::userIsAlreadyVoted($topic_id, (int)$userdata['user_id']),
|
||||
'POLL_VOTES_JS' => $poll_votes_js
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue