From 7a06956111abfde7b19dc79e724728af3f7c5a1b Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 1 Mar 2024 17:30:36 +0700 Subject: [PATCH] Show poll results for guests --- search.php | 2 +- viewforum.php | 2 +- viewtopic.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/search.php b/search.php index b20fe31ca..d3e8c9ed6 100644 --- a/search.php +++ b/search.php @@ -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'])), diff --git a/viewforum.php b/viewforum.php index 0841a8ccf..e34a30799 100644 --- a/viewforum.php +++ b/viewforum.php @@ -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']]), diff --git a/viewtopic.php b/viewtopic.php index ddd9b630f..cebfdd6c7 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -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