Show poll results for guests

This commit is contained in:
Roman Kelesidis 2024-03-01 17:30:36 +07:00
commit 7a06956111
3 changed files with 3 additions and 3 deletions

View file

@ -796,7 +796,7 @@ else {
'STATUS' => $topic['topic_status'],
'TYPE' => $topic['topic_type'],
'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL),
'POLL' => !IS_GUEST && $topic['topic_vote'],
'POLL' => (bool)$topic['topic_vote'],
'DL_CLASS' => isset($topic['dl_status']) ? $dl_link_css[$topic['dl_status']] : '',
'TOPIC_AUTHOR' => profile_url(array('username' => $topic['first_username'], 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank'])),

View file

@ -458,7 +458,7 @@ foreach ($topic_rowset as $topic) {
'STATUS' => $topic['topic_status'],
'TYPE' => $topic['topic_type'],
'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL && !$forum_data['allow_reg_tracker']),
'POLL' => !IS_GUEST && $topic['topic_vote'],
'POLL' => (bool)$topic['topic_vote'],
'DL_CLASS' => isset($topic['dl_status']) ? $dl_link_css[$topic['dl_status']] : '',
'TOPIC_AUTHOR' => profile_url(['username' => str_short($topic['first_username'], 15), 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank']]),

View file

@ -508,7 +508,7 @@ $template->assign_vars([
'U_SEARCH_SELF' => "search.php?uid={$userdata['user_id']}&t=$topic_id&dm=1",
'TOPIC_HAS_POLL' => $topic_has_poll,
'POLL_IS_EDITABLE' => (!$poll_time_expired),
'POLL_IS_EDITABLE' => !$poll_time_expired,
'POLL_IS_FINISHED' => ($t_data['topic_vote'] == POLL_FINISHED),
'CAN_MANAGE_POLL' => $can_manage_poll,
'CAN_ADD_POLL' => $can_add_poll