Guests can view polls (#1464)

* Guests can view polls

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-05-04 23:48:27 +07:00 committed by GitHub
commit 8b459e8670
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 1 deletions

View file

@ -438,7 +438,7 @@ $sel_post_order_ary = [
$lang['NEWEST_FIRST'] => 'desc'
];
$topic_has_poll = ($t_data['topic_vote'] && !IS_GUEST);
$topic_has_poll = $t_data['topic_vote'];
$poll_time_expired = ($t_data['topic_time'] < TIMENOW - $bb_cfg['poll_max_days'] * 86400);
$can_manage_poll = ($t_data['topic_poster'] == $userdata['user_id'] || $is_auth['auth_mod']);
$can_add_poll = ($can_manage_poll && !$topic_has_poll && !$poll_time_expired && !$start);